We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5102
    • 9 Posts
    Trying to set up a secondary menu in a template that will list only the menu items below the parent. The trouble though is that I am unable to get a startId of anything other than 0 to display any sort of menu. Any other value results in the [+wf.linktext+] and [+wf.wrapper+] placeholders being written out on the page.

    [[!Wayfinder?
    &startId=`[[UltimateParent]]`
    &displayStart=`TRUE`
    &level=`0`
    &startItemTpl=`msc.startItem`
    &outerTpl=`msc.sideOuter`
    &innerTpl=`msc.inner`
    &rowTpl=`msc.row`
    &innerRowTpl=`msc.row`
    &firstClass=`firstItem`
    &lastClass=`lastItem`
    &hereClass=`active`
    &hideSubMenus=`TRUE`
    ]]
    


    Installation is MODx Revolution 2.0.7-pl (traditional) with Wayfinder 2.1.3rc2 and UltimateParent 2.0pl

    As far as I can tell this should be working. Any thoughts or advice on this are welcomed.

    Thanks.
      • 3749
      • 24,544 Posts
      Did you check to make sure that all the resources are published and that Hide from Menus is not set on them?
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 5102
        • 9 Posts
        Quote from: BobRay at Feb 20, 2011, 03:10 PM

        Did you check to make sure that all the resources are published and that Hide from Menus is not set on them?
        Yes. I can confirm that all resources are published and not hidden from the menus.

        Setting the startId to 0 will display the full menu, but this isn’t what has been asked for. But, setting the value to anything other than zero seems to cause an issue. I’ve tried using [[UltimateParent]], [[*parent]], both cached and uncached versions, as well as even hard coding the desired document id as a test, all results were the same.

        Thanks.
          • 3749
          • 24,544 Posts
          What happens if you leave out the &hideSubMenus parameter?

          Also, try [[!UltimateParent]] (uncached) and be sure to clear the site cache after changing it.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 5102
            • 9 Posts
            Quote from: BobRay at Feb 20, 2011, 03:27 PM

            What happens if you leave out the &hideSubMenus parameter?

            Also, try [[!UltimateParent]] (uncached) and be sure to clear the site cache after changing it.
            I’d already tried both the uncached and cached versions of UltimateParent, but for good measure I made sure to try them again as well.

            Removing the &hideSubMenus parameter had no effect.

            The cache was cleared after each change as well.

            One change that did seem to have an effect though was to remove the &displayStart parameter. This is a little problematic though as I really need to use this functionality to display that section title above the menu. The code for the msc.startItem chunk is below if it’s needed for reference.
            <h2>[+wf.linktext+]</h2>[+wf.wrapper+]

              • 3749
              • 24,544 Posts
              I should have noticed this before. Try:

              &showStart=`1`
              &hidSubMenus=`1`

                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 5102
                • 9 Posts
                Changing the `TRUE` values to `1` doesn’t seem to be changing anything.

                If I change &displayStart to be &showStart instead, the menu appears, but not the Start Item Heading. Is &showStart still valid in the Revolution version of Wayfinder?

                Thanks again for your continued efforts.
                  • 3749
                  • 24,544 Posts
                  It’s definitely &displayStart. Here’s the code:

                  <?php
                   if (($level == 1 && (!$this->_config['displayStart'] || $this->_config['id'] == 0)) || ($level == 0 && $this->_config['displayStart'])) {
                                          $output = $menuPart;
                                      } else {
                                          $output = str_replace("[[+wf.wrapper.{$parentId}]]",$menuPart,$output);
                                      }
                  }


                  &showStart is definitely not there.

                  You might try setting &debug=`1` to see if that tells you anything.
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 18373 ☆ A M B ☆
                    • 3,141 Posts
                    This problem was based on mixing up Evo and Revo syntax... I think it was the outer template that had [+wf.wrapper+] which should’ve been [[+wf.wrapper]] as it’s on a Revolution install. And as the wrapper wasn’t being set to the rest of the menu, nothing would show up..
                      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.
                      • 36549
                      • 572 Posts
                      I am also having trouble getting [[ultimateParent]] to work in Revo 2.0.8pl
                      Normally for sub-menu items to display on a page i would use the following minimum call in Evo:
                      [!Wayfinder? &startId=`[[UltimateParent]]` &level=`2` &hideSubMenus=`true` &hereClass=`active`!]


                      so in Revo it would look like this:
                      [[!Wayfinder? &startId=`[[UltimateParent]]` &level=`2` &hideSubMenus=`true` &hereClass=`active`]]


                      ...but it doesn’t work. The above just displays the top level items. I’ve tried [[!ultimateParent]] uncached and have cleared the system cache.
                      Can anyone offer any suggestions?

                      Thanks

                      J

                        www.9thwave.co.uk
                           WEB | DESIGN | PRINT