0

我有以下包含在块中的玉文件:

.list_fl(style='position:fixed; z-index:100; width:200px;')
.ul.line_h30t
    .li
        .menu
            a(href='systemSummary')
                span(style='font-size:20px;') System summary
.ul.line_h20t
    .li
        .menu
            span(style='font-size:20px;') Game lobbies
            a(href='gamesInProgress/0')
                span(style='margin-left:5px;') - Games in progress
            a(href='scheduledGames/0')
                span(style='margin-left:5px;') - Scheduled games
            a(href='completedGamesLog/0')
                span(style='margin-left:5px;') - Completed games log
.ul.line_h20t
    .li
        .menu
            span(style='font-size:20px;') Mall status
            a(href='mallsAwaitingConfirmation/0')
                span(style='margin-left:5px;') - Malls awaiting confirmation
            a(href='mallList/0')
                span(style='margin-left:5px;') - Mall list
            a(href='blackListMalls/0')
                span(style='margin-left:5px;') - Black list malls
.ul.line_h20t
    .li
        .menu
            span(style='font-size:20px;') Users status
            a(href='userList/0')
                span(style='margin-left:5px;') - User List
            a(href='monitoredUsers/0')
                span(style='margin-left:5px;') - Monitored Users
            a(href='userBlackList/0')
                span(style='margin-left:5px;') - Black List
.ul.line_h20t
    .li
        .menu
            span(style='font-size:20px;') Commercial
            a(href='eventRegistration')
                span(style='margin-left:5px;') - Event registration
.ul.line_h20t
    .li
        .menu
            span(style='font-size:20px;') Setting
            a(href='gamesSchedule')
                span(style='margin-left:5px;') - Games schedule
            a(href='gamesLimit')
                span(style='margin-left:5px;') - Games limit

然后将其作为一个块添加到主“布局”玉文件中(我在这里使用布局是因为没有更好的术语,我知道玉在这方面最近的变化)。这是“布局”文件:

doctype 5

html 头标题=标题链接(rel='stylesheet',href='/stylesheets/style.css')链接(rel='stylesheet',href='/stylesheets/sliding-flexible-menu.css')链接(rel ='stylesheet', href='/stylesheets/pictogram-button.css') 链接(rel='stylesheet', href='/stylesheets/zebra_datepicker.css') 链接(rel='stylesheet', href='/stylesheets /ccSchedule.css')

    script(type='text/javascript', src='/javascripts/jquery-1.7.2.js')
    script(type='text/javascript', src='/javascripts/jquery.sliding-flexible-menu.js')
    script(type='text/javascript', src='/javascripts/ccAdmin.js')
    script(type='text/javascript', src='/javascripts/ccSchedule.js')
    script(type='text/javascript', src='/javascripts/navMenu.js')
    script(type='text/javascript', src='/javascripts/zebra_datepicker.js')
    script(type='text/javascript', src='/javascripts/divPopup.js')
    script(type='text/javascript', src='/javascripts/highcharts.js')
    script(type='text/javascript', src='/javascripts/modules/exporting.js')

body
    header(style='padding-bottom:50px;')
        include partials/header
    #container
        nav
            include partials/navMenu
        section#contents
            block content
    footer.footer
        include partials/footer
    script
        var currentPage = !{JSON.stringify(pageName)};
        var data = !{JSON.stringify(data)};
        $(document).ready(function(){
            $.navMenu.Init();
            $.ccAdmin.Init();
        });

我遇到的问题是,当呈现一页时,链接会正确显示,例如:

http://www.mysite.com/gamesInProgress/0

但是,如果我点击此链接,则链接将显示为:

http://www.mysite.com/gamesInProgress/gamesInProgess/0

如果有人能对此有所了解,我将不胜感激。

提前致谢!

4

1 回答 1

2

您需要使用绝对路径而不是相对路径,如何更改为

a(href='/gamesInProgress/0')
于 2012-08-18T02:35:00.503 回答