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

    I am having some problems disabling links within a navigation menu populated by Wayfinder. I have tried to add a template variable and it does show up in the TV section of each resource page. However, it does not properly disable the link when I check the "Yes" option within that resources TV tab.


    I am using Revolution 2.0.0.


    Any help at all would be much appreciated!!! grin


    Thanks!
      • 14951
      • 151 Posts
      You can just uncheck "Show In Menu" on the pages you don’t want to display.
        • 11076
        • 159 Posts
        you can use the "&excludeDocs=" option, with Comma seperated list of document IDs to be excluded from the menu.

        _
        http://rtfm.modx.com/display/ADDON/Wayfinder#Wayfinder-Parameters
          Michael Shraibman( gOmp)  | Freelance Design & Development | wink  impossible is nothing...
          • 19854
          • 3 Posts
          Thanks for the feedback guys, but unfortunately my client wants the links to still show up but to be inactive. In other words, they would still appear on the page but you would not be able to click on them at all. This has been giving me some problems for the last few weeks.

          I hope someone has done this before! The web development company that was originally in charge of this has completely abandoned me and I have had to figure out a ton of problems without their assistance. This is the last issue I have! SO close!!

          Again, any help would be MUCH appreciated!

          Thanks.
            • 11076
            • 159 Posts
            You can use a custom-made snippet (it’s always an option) smiley .
            but, you can also try using
            IF Package/Snippet in Repo. : http://modxcms.com/extras/package/600
            IF Documentation: http://rtfm.modx.com/display/ADDON/If

            Use the IF snippet in the Tpl(Template-Chunk) to compare The TV you have been set before and assigned to your resources.
            And that’s how you can conditionally choose if to output the [[+wf.link]] PlaceHolder and generate the link depending on your choice over the TV.

            You wiil need to get the TV’s per resources in the Tpl for the comparison,
            I don’t have much experience using Template-Variables in Wayfiner’s Template-Chunks (as TV-PlaceHolders(?),
            but it’s can be good solution.
            if it’s to much truble for you going on with the TV’s in wayfinder, you can use getResourceField to retrive the TV you need for the comparison.
              Michael Shraibman( gOmp)  | Freelance Design & Development | wink  impossible is nothing...
              • 19854
              • 3 Posts
              Thanks to everyone for your feedback! I have found a solution!

              Within the sections that I wanted to have disabled in my Wayfinder menus I simply entered "class=’linkdisable’" in the Link Attributes field on each resource’s page (in the manager). I then went into the CSS document that was linked to this page and added this:


              }

              a.linkdisable{
              cursor:default;
              pointer-events: none;
              }

              a:hover.linkdisable{
              text-decoration:none !important;
              }



              It worked! Thank goodness! grin


              EDIT: THIS DOES NOT WORK IN INTERNET EXPLORER!!!!! I used onclick="return(false);" to achieve a similar result in IE.
                • 34013
                • 10 Posts
                Quote from: MM2010 at Jan 05, 2011, 10:11 AM
                Thanks to everyone for your feedback! I have found a solution!

                Within the sections that I wanted to have disabled in my Wayfinder menus I simply entered "class='linkdisable'" in the Link Attributes field on each resource's page (in the manager). I then went into the CSS document that was linked to this page and added this:


                }

                a.linkdisable{
                cursor:default;
                pointer-events: none;
                }

                a:hover.linkdisable{
                text-decoration:none !important;
                }



                It worked! Thank goodness! grin


                EDIT: THIS DOES NOT WORK IN INTERNET EXPLORER!!!!! I used onclick="return(false);" to achieve a similar result in IE.

                Thanks for this information - exactly what I was looking for!