We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23193
    • 7 Posts
    I’m very new to all this so apologies for yet another newbie wayfinder query.

    I’ve been going round in circles trying to get it to work. I’ve tried various examples. I copy the chunks, I copy the css, copy the call then voila! - nothing happens. I’ve gone right back to basics now. All I’ve done this time is take the sample site, create a new template based on the site I’m creating, add the relevant files to my header and put in the same wayfinder call.

    I get a proper menu, which looks as it should (for once), but the dropdown doesn’t work and I get no links to child pages. I did it this way to try and eliminate any issues with javascript in the wrong place or css that’s missing. I’ve left the template files exactly where they are. The same files produce a working menu on pages with the sample site template. All I can think of now is there is something in either my header or my own css which is stopping it from working.

    My header:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
    <base href="[(site_url)]"></base>
    <title> [[++site_name]] | [[*pagetitle]]</title>
    <link rel="stylesheet" type="text/css" href="assets/templates/base/style.css" />
    <link rel="stylesheet" href="assets/components/modxss/css/layout.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="assets/components/modxss/css/modxmenu.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="assets/components/modxss/css/form.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="assets/components/modxss/css/modx.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="assets/components/modxss/css/print.css" type="text/css" media="print" />
    <script src="assets/components/modxss/js/mootools.js" type="text/javascript"></script>
    <script src="assets/components/modxss/js/drop_down_menu.js" type="text/javascript"></script>
    </head>

    <body>
    <div id="container">
    <div id="banner"></div><!-- End of banner -->
    <div id="leftbar"></div><!-- End of leftbar -->
    <div id="rightbar"></div><!-- End of rightbar -->
    <div id="footer"></div><!-- End of footer -->
    <div id="content">
    [[*content]]
    </div><!-- End of content -->

    <div id="ajaxmenu">
    [[Wayfinder?
    &startId=`0`
    &outerTpl=`mh.outer`
    &innerTpl=`mh.inner`
    &rowTpl=`mh.row`
    &innerRowTpl=`mh.innerRow`
    &firstClass=`first`
    &hereClass=``
    ]]
    <!-- End of topnavigation -->
    </div><!--end of container-->
    </body>
    </html>

    My css

    #container {position: relative; margin-left: auto; margin-right: auto; width: 1200px; background-color: #c9cbc8; font-family: "arial";}

    /* Position and style for website banner*/

    #banner {width: 1200px; height: 100px; position: absolute; left : 0px; top : 0px; background-image:url(’sitebanner.jpg’);}

    /*main content*/

    #content {position: absolute; left : 200px; top: 120px; width: 800px; background-color: white;

    }

    /*left sidebar*/

    #leftbar {position: absolute; left : 0px; top: 120px; width: 200px; height: 800px; background-color: red;

    }

    /*right sidebar*/

    #rightbar {position: absolute; right : 0px; top: 120px; width: 200px; height: 800px; background-color: black;

    }

    /* Bottom of page*/

    #footer {

    }


    The result is at http://www.forde.uk.com/modx3/index.php?id=1

    If anybody can help I would be very grateful.





      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Rule #1 when something weird is going on: Check validation.

      http://validator.w3.org/check?uri=http%3A%2F%2Fwww.forde.uk.com%2Fmodx3%2Findex.php%3Fid%3D1&charset=%28detect+automatically%29&doctype=Inline&group=0
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 33968
        • 863 Posts
        Your menu is displaying fine but your #content div has z-index set to 300. That means it displays on a higher ’level’ than your menu and the submenu is hidden underneath it.

        Add z-index: 0; to your css for #content and it should be sorted out.
          • 23193
          • 7 Posts
          Thanks for both replies.

          I’ve corrected and revalidated the html so that’s fixed. I didn’t know such a facility existed so even learning that has been very useful and I’ll be putting my code through it in future.

          You had me stumped on the z-index as my content ID had no z-index in the css. Then I realised that the sample site css file also had a content ID in it and found it in there. Changed to zero as suggested and now everything works!

          I need to go back to my main site now on another server and work through again from the start to see if I can get the other menus I’ve been having trouble with to function.

          Thanks again for the help.

          As an aside, I didn’t have access to IE over the weekend and the first time I could try it was this morning. The (incorrect) code displayed as though there was no css file. If anyone with IE can tell me if it’s displaying properly in IE now that would be helpful (was OK even with the incorrect code in Mac Firefox, Safari and iOS Safari).