• Wayfinder, Display Parent and Children#

  • Pleth Reply #1, 3 years, 4 months ago

    Reply
    I am trying to use Wayfinder to display the Parent (with link) and it's children.

    I have tried [!Wayfinder? &startId=`` &displayStart=`true`!], but this displays the Parent title only in <h> tags and not as a link. What's the correct call for creating this?


  • Paulp Reply #2, 3 years, 4 months ago

    Reply


    Should show everything


  • Pleth Reply #3, 3 years, 4 months ago

    Reply
    Thank you, but I am wanting to exclude everything but the directory I am in.


  • kongondo Reply #4, 3 years, 4 months ago

    Reply
    Quote from: pleth at Jan 14, 2009, 04:00 PM
    I am trying to use Wayfinder to display the Parent (with link) and it's children.

    I have tried [!Wayfinder? &startId=`` &displayStart=`true`!], but this displays the Parent title only in <h> tags and not as a link. What's the correct call for creating this?

    I don't understand your question however, I can tell you that by setting &displayStart=`true` you are actually telling WF to use the startItemTpl as the highest container of the menu (under the condition that &startId is greater than 0). WF has an inbuilt startItemTpl which it will use in case you don't create one - it looks like these

    <h2>[+wf.linktext+]</h2>[+wf.wrapper+]


    That's why the parent item in your menu is enclosed in <h2> tags....
    cheers/k




  • Paulp Reply #5, 3 years, 4 months ago

    Reply
    Quote from: pleth at Jan 14, 2009, 04:26 PM
    Thank you, but I am wanting to exclude everything but the directory I am in.

    Try



  • kongondo Reply #6, 3 years, 4 months ago

    Reply
    Quote from: pleth at Jan 14, 2009, 04:26 PM
    Thank you, but I am wanting to exclude everything but the directory I am in.

    By exclusion are you talking about one and only one directory? E.g.

    Home
    About us
       History
       Mission
    Contact us

    so, in the above e.g., do you mean you would want your menu to only show the parent folder "About us" and its children AND that "Home" and "Contact us" SHOULD not be included in the WF output? Or do you mean what PaulP has asked above, i.e. hide sub-menus of parent documents unless they are active?

    /k


  • Pleth Reply #7, 3 years, 4 months ago

    Reply
    Exactly. If I am in the About us section you only see About us, History, Mission. If I am in the Contact us section you see Contact us, Telephone, and Address. I am just unable to generate the parent with the appropriate link using the code I posted.

    Home
    About us
    History
    Mission
    Contact us
    Telephone
    Address


  • Pleth Reply #8, 3 years, 4 months ago

    Reply
    Thanks for your help guys. I think I figured it our using the FirstChildRedirect and GetField snippets.


  • sgt.bi1ko Reply #9, 3 years, 4 months ago

    Reply
    Hi guys

    Having not tested the suggestions outlined above, I would like to seek clarification on the menu I would like to implement (which may be exactly the same!?). I want a menu that works like Reuters news site (http://www.reuters.com ). That is, if you click on (e.g.) Entertainment in the left-hand menu, you are subsequently presented with:

    ...
    Technology
    Entertainment
    Film
    Music
    People
    ...

    where the existing parent directories are displayed, as well as the children in the active directory. Is the suggestion made by paulp:



    the code that I am after to achieve this?

    Many thanks,

    JB


  • Paulp Reply #10, 3 years, 4 months ago

    Reply
    Yep, that should work