We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51824
    • 27 Posts
    Hi,

    is there a way to add static links at the end of the menu generated automatically by wayfinder?

    I want to add a language menu dropdown at the end of navigation menu, presenting the babel-Links to the actual page in other language, displayed by the national flag as gif, and also a link displaying a modal (bootstrap) which enables to login via the login-extra.

    Second question: Can I somehow change the "Login"-Link in the above mentioned menu automatically to display a "logout"-Link whenever a user is logged in?

    Kind regards,
    calvair

    MODX Revolution 2.4.2-pl
    installed Add-Ons concerning this post:
    -Wayfinder
    -Login

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

    • discuss.answer
      Put your static link at the end of the outerTpl chunk, after the [[+wf.wrapper]] placeholder and before the closing UL tag. An outerTpl chunk might look like this:
      <ul>
      [[+wf.wrapper]]
      <li><a href="[[~42]]">Static Link</a></li>
      </ul>


      You can get more complex if you use the Personalize snippet which uses two chunks, one for logged in and one for not logged in. You can modify the LI item for either condition, even to the extent of including or not including the classname or ID and the login form for the Javascript to show.
      <ul>
      [[+wf.wrapper]]
      [[!Personalize?
          &yesChunk=`MyYesChunk`
          &noChunk=`MyNoChunk`
      ]]
      </ul>

      http://bobsguides.com/personalize-tutorial.html

        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
        • 51824
        • 27 Posts
        wow.

        Thanks for your fast and perfect answer - will trying it at once!

        Sounds like it's doing just what I'm intended to do...