We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32645
    • 377 Posts
    I have a list of countries, ie:


    <h3>Cuba</h3>
    <p>Introtext of Cuba page</p>

    <h3>Egypt</h3>
    <p>Introtext of this page</p>

    <h3>Test Resort</h3>
    <p>Introtext of this page</h3>

    Test Resort is a child of "Egypt", as everything is inline and is not structured in a traditional UL/OL list, I would like it to display:


    <h3>parent page > this page</h3>

    Example:
    <h3>Egypt > Test resort</h3>

    I have tried putting [+parent+], [*parent*] and even [*wf.parent*] -- but I can’t seem to display the parent name/value.

    How do I go about doing this?
      • 5689
      • 289 Posts
      I think I understand what you’re trying to do, but would you mind posting your Wayfinder call code? I’ll see if I can help you figure this out. laugh
        I&#39;m learning more about MODx all the time and loving it.
        • 16183
        • 1,390 Posts
        Hi,

        This is because [*parent*] will return the id of the parent of the document (an integer)

        What you need is something that will return some text such as the page title or the long title or the alias. You would use this as so:

        [*longtitle*] - for longtitle
        [*pagetitle*]  - for pagetitle
        [*alias*]  - for alias

        But in your particular case I don’t think you need to use these document variables. There are different ways of accomplishing this but the following should work.

        rowTpl chunk - this is for "Egypt", etc

        <h3 [+wf.classes+]><a href="[+wf.link+]">[+wf.linktext+]</a></h3>[+wf.wrapper+]


        Then for the child documents

        innerRowTpl chunk - This is for "Test resort", etc

        <p>[+wf.introtext+]</p>



        You obviously need to construct your outerTpl - could have [+wf.wrapper+] if you don’t want to wrap your menus with anything. If the same case applies to your sub-menus then you don’t need to construct an innerTpl.

        Not tested but should work...

        cheers/k

          • 32645
          • 377 Posts
          Thanks for your help, I’ve used this solution and it seems to work -- however my client wanted a different layout that didn’t use/show the parent, so I am using this instead.

          Thanks again.
            • 16183
            • 1,390 Posts
            That’s alright.. smiley

            cheers/k