We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6016
    • 55 Posts
    It appears that the old Dropmenu snippet is no longer included in MODx. Its place is taken by the Wayfinder snippet.

    Dropmenu, according to its documentation at http://modxcms.com/snippet-dropmenu.html, had a "&selfAsLink" option that could be used to tell it that the entry for the current page should not be a link. Not only do I personally find it annoying when I follow a link and nothing happens, but also, having no link to the current page is said to be in general good web design practice:

    http://www.useit.com/alertbox/20031110.html

    The Ten Most Violated Homepage Design Guidelines (in 2003)

    "Don’t include an active link to the homepage on the homepage."

    "...Never have a link that points to the current page."

    And see also http://www.useit.com/alertbox/breadcrumbs.html which repeats the same recommendation for breadcrumbs. (And the MODx Breadcrumbs snippet does it right.)

    I have been unable to find a Wayfinder option that will cause it to not make the entry for the current page a link. Nor does using the "&selfAsLink" option have any effect.

    And I can find no way of using CSS to change a link into a non-link. Change a color, yes. Change a link to a non-link, not that I know of.

    Was the no-link-to-current-page feature eliminated when Wayfinder replaced Dropmenu?

    Is there a known simple solution?

    Rahul
      • 25663 MODX Staff
      • 12,272 Posts
      Use a separate template without the href for the current page template.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 6016
        • 55 Posts
        Quote from: rthrash at Apr 10, 2007, 09:45 AM

        Use a separate template without the href for the current page template.

        Thank-you!

        Part of my learning with MODx has been to get familiar with the terminology. Here, I needed what the Wayfinder documentation calls a template but what the MODx menus call a chunk.

        Once I got past this initial hurdle, it took me only about fifteen minutes to add the chunk. For the benefit of others, here is what I did.

        1. On my template (not chunk) for the web site, I changed the invocation of Wayfinder to:

        [!Wayfinder?startId=`0` &level=`2` &hereTpl=`hereTpl`!]

        (Note the reference to &hereTpl.)

        2. On the Site->Home->Resources->Chunks tab, created a new chunk called &hereTpl with the following contents:

        <li[+wf.id+][+wf.classes+]>
          <span class="here_non_link" title="[+wf.title+]">[+wf.linktext+]</span>
          [+wf.wrapper+]
        </li>
        


        The effect of the above is that in the menu generated by Wayfinder, the entry for the current page will be printed as non-link text, and will belong to the "here_non_link" class.

        3. To my css for the web site, added a "here_non_link" class with appropriate css settings.

        Works nicely.

        Rahul

        P.S. I think this should be Wayfinder’s default behavior, because I cannot think of many situations when the user will prefer the entry for the current page to be a link.
          • 25663 MODX Staff
          • 12,272 Posts
          Thanks crossconnect! smiley
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 6016
            • 55 Posts
            This, and other things that I have learnt and am learning about MODx, are now described at the MODx-based web site that I am building:

            http://rahul.rahul.net/modx-hints.html

            Rahul