• [solved] Display parent pagetitle in submenu#

  • MathiasD Reply #1, 1 year, 8 months ago

    Reply
    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


  • sottwell Reply #2, 1 year, 8 months ago

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


  • odeclas Reply #3, 1 year, 8 months ago

    Reply
    I'm using [[getResourceField? &id=`` &field=`longtitle`]] when not in a Wayfinder call. Probably a long-winded solution.


  • MathiasD Reply #4, 1 year, 8 months ago

    Reply
    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!


  • sottwell Reply #5, 1 year, 8 months ago

    Reply
    That's certainly different; in Evo's Wayfinder &displayStart is 1 or 0; either it displays the start item or it doesn't.


  • odeclas Reply #6, 1 year, 8 months ago

    Reply
    Still does. From RTFM:

    &displayStart Show the document as referenced by &startId in the menu.ALSE

    So it's a coincidence in this case that it works (presumably the actual value of ultimateParent id is 1).


  • nicboyde Reply #7, 3 months, 2 weeks ago

    Reply
    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...