We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14167
    • 55 Posts
    Hi All,

    I want to create a second navigation on my clients site. This second nav will display a few extra pages at the bottom of the page (T&C’s, Contact us, Sitemap etc.) which I don’t wont appearing in the main navigation.
    I was thinking about having a checkbox as a TV which when checked displayed the page in the footer.
    Could you have a chunk called by Wayfinder that hold’s an ’if’ snippet checking to see if that page has the TV checkbox checked?

    Something like:

    [[!If? &subject=`[[*showFootNav?]]` &operator=`EQ` &operand=`1` &then=`
    <li[[+wf.id]][[+wf.classes]]><a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]><span>[[+wf.linktext]]</span></a>[[+wf.wrapper]]</li>
    `]]


    Any help questions on this more than welcome...
      Linux, PHP 5.2, MySQL 5.0, Revo 2.2.0-pl2
      • 36442
      • 97 Posts
      Better way is to place two Wayfinder calls, just exclude some docs in main nav and include them in footer nav.
      For example, your T&C’s, Contact us, Sitemap pages have IDs 2,3,4, then main menu call should be: [[Wayfinder? ... &excludeDocs=`2,3,4`]]
      And footer navigation: [[Wayfinder? ... &includeDocs=`2,3,4`]]
      Dots mean some other parameters.
        • 14167
        • 55 Posts
        Thanks for the reply Warsteiner, I did think about this, just not sure its the most flexible for the client, but sounding like my only option...
          Linux, PHP 5.2, MySQL 5.0, Revo 2.2.0-pl2
          • 16868
          • 24 Posts
          I’m doing a very similar thing on my site.

          You can make a snippet to grab the IDs of all resources that have the template variable stating they should appear in the special menu.

          Here’s an explanation of what I did:

          http://modxcms.com/forums/index.php/topic,43694.msg358377.html#msg358377

          You’ll have to change it around to use the includeDocs and excludeDocs thing mentioned by Warsteiner.

          Hope that helps.
            • 18373 ☆ A M B ☆
            • 3,141 Posts
            Could also set the items you don’t want to appear to not show in menu, and override that in the footer one?

            You can set individual resources to be hidden from the menu on its edit page, and there’s a parameter to override that, in the docs.
              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.
              • 22427
              • 793 Posts
              You could use PHx:
              [+phx:if=`[[*showFootNav?]]`:is=`1`:then=`<li[[+wf.id]][[+wf.classes]]><a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]><span>[[+wf.linktext]]</span></a>[[+wf.wrapper]]</li>`:else=``+]