We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19534
    • 183 Posts
    Hey!

    I’ve got some complicated templates (chunks) for Wayfinder in which I’ve structured my code with tabs, newlines etc.

    But in the frontend I’d like to display the navigation (output of the Wayfinder snippet just in one line)

    I tried

    [[Wayfinder? &param1=`value1` &param1=`value1`:strip]]


    but the tabs and newlines aren’t stripped...

    How can I apply the strip output-filter on the output of a snippet (here Wayfinder)?
      Add-On to easily manage your multilingual sites: Babel
      • 8109
      • 128 Posts
      By my basic understanding, tabs and newlines are ignored by html. You probably need to use css to style your Wayfinder output.
        Revo 2.0.8-pl
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Wayfinder has a parameter to remove the newlines; this was added because there are some circumstances in IE6 where a newline will cause a gap between items in a vertical menu. Use 0 for FALSE, 1 for TRUE.
        &removeNewLines
        default: FALSE
        values: [ TRUE | FALSE ]
        description: Wayfinder will automatically add line breaks into the generated output for increased code readability. To remove these line breaks set this parameter to FALSE.
          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
          • 8109
          • 128 Posts
          Also, your strip function will probably work using this syntax:

          [[Wayfinder:strip? &param1=`value1` &param1=`value1`]]

          It’s undocumented, but the example in the docs is a bit confusing. You can apply output filters to snippets that have arguments, but the modifier (strip in this instance) goes after the snippet name and before the question mark.
            Revo 2.0.8-pl