We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21946
    • 283 Posts
    Hello, sorry for my awful english, i am a fucking french.
    I work with wayfinder to build menus on my last site.But instead of listing documents, this time i ask wayfinder to list "document-links" (i mean a classic document that you declare as a simple web link).
    It works fine, the world is beautiful and i like the birds; however the class "active" doesn’t work anymore ! So when i am on the active document, no way for me to put a shiny link in the menu with css to tell to the visitor "you are here".
    HereTpl doesn’t work either.

    Is there a solution to solve this issue?

    At last, i created a small snippet that add a "active" class when you use "documents-weblinks" with wayfinder but it adds a paramater in the url and it breaks my pretty urls. So in the worst case : what can i add to my .htacess in order that my variable doesn’t appear like this ??

    http://www.monsite.fr/contact.html&link=12

    link is my variable name.

    I feel so lonely in this cold world. I can’t get no satisfaction and we all live in a yellow submarine don’t we?
    Help, i’m going mad tongue
      [url=http://www.savepoint.fr/index.php?id=38] -petits tuyaux pour les d
      • 25663 MODX Staff
      • 12,272 Posts
      This is a limitation in 096x and with Weblinks. Weblinks redirect you to another page in your site making your navigation jump around. Fortunately in Revolution we’ve got a new type of Symlink/Clone document that forwards the browser to the content and therefore doesn’t change the URL/position in the menu.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 21946
        • 283 Posts
        Ok so i guess my snippet could be useful for someone else; and i’m looking forward to use revolution smiley
        Thanks for your answer !

        maybe you can help me for my second question? Is it possible for me to hide my variable &link from the url with the.htacess or with the config of modx? For the snippet, i need to add
        [+wf.link+]&link=[+wf.docid+]

        to create this chunk for wayfinder
        <a class="[[ActiveLink? &link_id=`[+wf.docid+]`]]" href="[+wf.link+]&link=[+wf.docid+]">

        but now my pretty-urls looks like this: (beurk)
        http://www.monsite.fr/contact.html&link=12

          [url=http://www.savepoint.fr/index.php?id=38] -petits tuyaux pour les d
          • 25663 MODX Staff
          • 12,272 Posts
          I don’t know about your second question but I’m sure someone will chime in. Good luck!
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 21946
            • 283 Posts
            Sorry for the up but it would be nice if someone could help me; i search for a solution since several days without success and my aknowledges in url-rewriting are very bad smiley
              [url=http://www.savepoint.fr/index.php?id=38] -petits tuyaux pour les d
              • 7231
              • 4,205 Posts
              This has been discussed from time to time and I don’t remember ever seeing a solution. I think that more is needed than so simply edit the rewrite rules.
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don&#39;t know what it is.
                Do you, Mr. Jones? - [bob dylan]
                • 10449
                • 956 Posts
                hmm, in my pre-modx days I once did a simple PHP-driven menu. I defined the URLs in an array, looped through it, and checked the current URL. If it matched the array-item, I inserted a CSS class, otherwise I output a regular link. Pretty straightforward... If you don’t have too many hierarchies and the overall menu is not too complicated, this could be rewritten for modx. I don’t see why it shouldn’t work with weblinks as well...

                  • 7231
                  • 4,205 Posts
                  You can also use a standard document and use a redirect snippet.
                    [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                    Something is happening here, but you don&#39;t know what it is.
                    Do you, Mr. Jones? - [bob dylan]
                    • 21946
                    • 283 Posts
                    You can also use a standard document and use a redirect snippet.
                    i never tried that, i will check this solution. The only thing important is that it must be intuitive for the person who will use the site...

                    hmm, in my pre-modx days I once did a simple PHP-driven menu. I defined the URLs in an array, looped through it, and checked the current URL. If it matched the array-item, I inserted a CSS class, otherwise I output a regular link. Pretty straightforward... If you don’t have too many hierarchies and the overall menu is not too complicated, this could be rewritten for modx. I don’t see why it shouldn’t work with weblinks as well...
                    I’m not very good in english : you’re talkin about a function php you made yourself in order to build a menu isn’it? He can build dynimacally the menu, that’s to say : it will be okay if the person add a news web link in modx with your system? The link will be added to the array?

                    I think that more is needed than so simply edit the rewrite rules.
                    okay... it would have been to easy if my little snippet had solved so simply all my problems rolleyes

                    i’m not able to hack the code of wayfinder and i see no solution in php without use a query string in url to remember and compare the id of link... What a pity; wayfinder is so powerful, but this time my goose is cooked.
                    Thank you for you help smiley
                      [url=http://www.savepoint.fr/index.php?id=38] -petits tuyaux pour les d