0
votes

I have the following jade file that is included in a block :

.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

This is then added as a block to the main 'layout' jade file (I use layout here for lack of a better term, I'm aware of the recent changes to jade in this regard). Here is the 'layout' file:

doctype 5

html head title= title link(rel='stylesheet', href='/stylesheets/style.css') link(rel='stylesheet', href='/stylesheets/sliding-flexible-menu.css') link(rel='stylesheet', href='/stylesheets/pictogram-button.css') link(rel='stylesheet', href='/stylesheets/zebra_datepicker.css') link(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();
        });

The problem I have is that when one page is rendered the links display correctly for example :

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

How ever if I follow this link the link is then displayed as :

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

If anyone could shine some light on this I would be extremely grateful.

Thanks in advance!

1

1 Answers

2
votes

you need use absolute path instead of relative path, how about change to

a(href='/gamesInProgress/0')