We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31186
    • 20 Posts
    Summary: No matter what I do with the chunk, Wayfinder is putting out the same HTML code every time. It’s almost as if there is sort of a default that it is using.

    Code

    I have this in a Template Variable--by the way, the TV is called [*left-nav*]

     [[Wayfinder? &startId=`45` &level=`3` &parentRowTpl=`cssplay_revParentRow` &hereTpl=`active`]]


    In the Chunk {{cssplay_revParentRow}} (there is only 1 chunk involved here) I have:

    <li><a [+wf.classes+] href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]<!--[if IE 7]><!--></a><!--<![endif]-->
    <table><tr><td>
    
    [+wf.wrapper+]
    
    </td></tr></table>
    <!--[if lte IE 6]></a><![endif]-->
    
    </li>



    I am trying to make the results (output) look like this:

    <li><a class="active" href="filename.html">Lorem Ipseum</a></li>


    But instead it does this:

    <li class="active"><a href="filename.html">Lorem Ipseum</a></li>


    As you can see I cant get the class to be in the "a" tag.
    I have tried the following in attempts to resolve:


    • Empty the cache for ModX
    • Delete the chunk completely: It still outputs that same code.
    • Search the database, and grep’ed the files to look for possible errors/misconfigurations
    • Adding a bunch of garbage text to the Chunk to see if its even updating at all: Does not output
    • Checked the correct spelling of the names of things (chunks, etc...)

    Perhaps my newbie question is simplistic, but I apologize as I do not see the problem.
      • 22303 MODX Staff
      • 10,725 Posts
      What markup did you say was in which chunk? There are several templates involved, and it would help if we knew specifically what chunk was named what in relation to the parameters you used in the call to the Wayfinder snippet.
        • 7231
        • 4,205 Posts
        Hello, I think that you have some problems with your call and tpl.

        The best place to understand all the different tpl options available is on the developers site:
        http://www.muddydogpaws.com/development/wayfinder/features.html

        Hope this helps.
          [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]
          • 31186
          • 20 Posts
          I have edited my original post to clarify chunk name.

          I also just removed the call to the stylesheet chunk because my menus are in my normal stylesheet (not a separate one), so I shouldn’t need to reference it here again, right?



          In response to dev_cw, I reviewed the documentation again and see no problems with it.
            • 24421
            • 44 Posts
            Sorry, but have you test to call Wayfinder un-cached? like [!Wayfinder?....!]
              • 24414
              • 45 Posts
              I don’t know if I’m missing something but you don’t specify any content above for your &hereTpl.

              Isn’t Wayfinder just outputting its default?

              &parentRowTpl only defines items that contain other items so editing it shouldn’t make any difference to where the active class is output in the case you highlight (item is not a container).
                • 31186
                • 20 Posts
                FIXED !

                I needed to add &rowTpl

                Turning on the DEBUG option helped to see this.

                I have been learning modX on demand, basically learning new things as I need to, so it’s hard to get the complete picture. E.g. templates calls, creating forms (with validation) etc... all sort of depend that you know other things about modX.

                Thanks a million everyone who helped answer this question.

                  • 31186
                  • 20 Posts
                  P.S. It would be foolish for me not to include my final stuff:

                   [!Wayfinder? &startId=`45` &level=`3` &rowTpl=`left-menu-row` &hereClass=`active` !]
                  


                  TEMPLATE

                  <li><a [+wf.classes+] href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a></li>