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

    I have just started working with modx (revo) and have a quick question regarding displaying the parents pagetitle in the submenu.

    I have searched around the forum and seen some answers but I can’t seem to get any of them to work.

    My template looks like this:
    <div class="submenu">
       <strong class="title">PARENT TITLE HERE</strong>
    [[Wayfinder? &startId=`[[UltimateParent]]` &outerTpl=`navigationsliste` &outerClass=`list` &level=`1`]]
    </div>
    


    Could anyone point me in the direction of a solution?

    Regards
    Mathias
      Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Doesn’t Revo’s Wayfinder have the &displayStart parameter to show the parent item?
        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
        • 22019
        • 390 Posts
        I’m using [[getResourceField? &id=`[[*parent]]` &field=`longtitle`]] when not in a Wayfinder call. Probably a long-winded solution.
          Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
          • 18608
          • 112 Posts
          Quote from: sottwell at Sep 14, 2010, 07:42 AM

          Doesn’t Revo’s Wayfinder have the &displayStart parameter to show the parent item?

          It surely does. This one works:

          [[Wayfinder? &startId=`[[UltimateParent]]` &outerTpl=`submenu` &outerClass=`list` &level=`1` &displayStart=`[[UltimateParent]]`]]
          


          Thank you very much!
            Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            huh That’s certainly different; in Evo’s Wayfinder &displayStart is 1 or 0; either it displays the start item or it doesn’t.
              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
              • 22019
              • 390 Posts
              Still does. From RTFM:

              &displayStart Show the document as referenced by &startId in the menu. Default=FALSE

              So it’s a coincidence in this case that it works (presumably the actual value of ultimateParent id is 1).
                Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
                • 21395
                • 91 Posts
                Well RTFM says it does, but read on, and you'll find out it doesn't! By default It creates a non-linked title for a menu in <h2></h2> html tags.

                I can't find any workaround that puts the parent into the same menu structure as its children. I always end up creating a higher-level container and have the parent and its erstwhile children all as 1st generation children of the higher-level container. And it isn't always convenient to do so... [ed. note: nicboyde last edited this post 14 years, 8 months ago.]
                  MODX Revolution 2.6.5-pl (traditional)

                  Hosted on MODX Cloud

                  Skype: nicbaldeagle