We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48152
    • 8 Posts
    Hi again,
    I've got the links successfully displaying with all the content and dropdowns. I was just wondering, is there a way to add an "If" statement? What I want to accomplish is in the picture below.

    Basically, if the li class="menu-item" i want the href="[[+wf.link]]" present, but if it isn't that class, I don't want the href tag present inside the A tag.

    This question has been answered by sottwell. See the first response.

    • discuss.answer
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If you are using Wayfinder, you can use the "category" or the "parent" status of the resource to determine what kind of element Wayfinder generates for it.

      &parentRowTpl - Name of the chunk containing the template for any document that is a container and has children. Remember the [wf.wrapper] placeholder to output the children documents.
      &categoryFoldersTpl - Name of the chunk containing the template for category folders. Category folders are determined by setting the template to blank or by setting the link attributes field to rel="category".

      http://rtfm.modx.com/extras/revo/wayfinder
        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
        • 48152
        • 8 Posts
        Thank you! I had figured this out just a few hours before, but thanks for the explanation. Greatly appreciated!