We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5347
    • 11 Posts
    Hi there, hope you can help.
    I’m trying modx out and must admit i’m loving it. I have a quick cheap job on of a client - he has bought a website template and wants me to brand and cms it up. All going far to well for my liking then I came up against the navigation. I have read through a few bits on here and gone through some of a book I found but i’m lost. There’s no need for a sub cat so it shouldnt be to hard? undecided
    I have two issues - One - It looks fine in Safari and Firefox (well need to sort out the cufon) but in explorer my page names all drop down under the first page. I have tried not showing ’home’ in the menu but the the issue just jumps to ’About Us’. The second issue is that the current page doesn’t highlight.

    The original HTML code for the menu is:
    <ul class="navigation">
                         <li class="current"><a href="#">home</a></li> 
                            <li><a href="#">About Us</a></li>                 
                            <li><a href="#">Our Products</a></li>                                
                            <li><a href="#">Accessories</a></li>
                            <li><a href="#">Contact</a></li>
                         </ul>


    In my modx I have this call:
    [[Wayfinder? &startId=`0` &level=`1` &outerTpl=`theme_menuContainer` &rowTpl=`theme_menuRows`]]


    This chunk (theme_menuContainer):
    <ul class="navigation"[+wf.wrapper+]</ul>


    And this chunk (theme_menuRows):
    <li[*wf.id*]><a [+wf.classes+] href="[+wf.link+]" title="[+wf.title+]" "[+wf.attributes+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>


    I hope some kind wizz can point me in the right way - I think I may have just found my new fave cms!
    The site is at http://qdg.designcarrier.co.uk/ if that helps.
    Thank you in advance

      • 10152
      • 156 Posts
      Hello,

      1 )
      <ul class="navigation">[+wf.wrapper+]</ul>
      Is it better now ?


      2 )
      and this :
      ... title="[+wf.title+]" "[+wf.attributes+]" ...
      shouldn’t be something like :
      ... title="[+wf.title+]" class="[+wf.attributes+]" ...
      or :
      ... title="[+wf.title+]" [+wf.attributes+] ... ?

      3 ) [EDIT] : as Mark H. mentionned it this is not correct.
      You have a problem in the snippet call syntax , it’s the syntax for modx revolution.
      The right syntax for evolution is [!Wayfinder? ... !] (remove both "!" if you want to use cache )
      Did you try to call wayfinder uncached for your highlighting problem ?
        • 5347
        • 11 Posts
        Hi French Fries and thanks alot for having a look at this!

        I have done all the things you have sugested and it seems to be working a treat in explorer now, I cant tell you how thankful I’am.

        The only thing that still didn’t seem to be working is the active link. When I view the source code it says its picking up:
        <ul class="navigation"><li><a  class="active" href="http://qdg.designcarrier.co.uk/" title="Home" >Home</a></li>
        <li><a  href="/index.php?id=2" title="About Us" >About Us</a></li>
        <li><a  href="/index.php?id=3" title="Our Products" >Our Products</a></li>
        <li><a  href="/index.php?id=4" title="Accessories" >Accessories</a></li>
        <li><a  class="last" href="/index.php?id=5" title="Contact" >Contact</a></li>
        </ul>
        

        So its seeing a class of ’active’ and the css in my template is ’current’. I have changed the ’current’ to ’active’ in my css but still no joy. I then noticed that wayfinder is putting the class after the closed <li>
        <li><a  class="active" href="http://qdg.designcarrier.co.uk/" title="Home" >Home</a></li>


        So I moved my [+wf.classes+] backwards so its now <li[*wf.id*] [+wf.classes+]> And haypresto its working! Again, thank you French Fries, a new modx fan is born this end!
          • 18373 ☆ A M B ☆
          • 3,141 Posts
          Quote from: French at Jun 30, 2010, 01:54 PM

          3 )
          You have a problem in the snippet call syntax , it’s the syntax for modx revolution.
          The right syntax for evolution is [!Wayfinder? ... !] (remove both "!" if you want to use cache )
          Did you try to call wayfinder uncached for your highlighting problem ?

          That is actually not true (or just formulated in a way that I read it differently).

          To use a snippet in Evolution uncached it’s [[SnippetName]], in Revolution this is the same for uncached.

          To use a snippet uncached you indeed use [!SnippetName!] in Evolution, whereas Revolution needs [[!SnippetName]].

          Plus how did you know he uses Evo or Revo? Wayfinder is available for both wink

          @ circoloco: you could also use the &hereClass or &selfClass parameters to specify what to name the class. And I’m just guessing that you’re using li.active in your css, whereas a.active would’ve matched the markup.

          Anyways, good it’s fixed. Just my $ 0.02

            Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

            Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
            • 10152
            • 156 Posts
            arf sorry thanks for correcting me.