We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17010
    • 20 Posts
    I am sure this is an easy one for most of you, but I have been trying every combination of wayfinder parameters listed on the muddydogpaws site to try and fix it and have not been successful up until now.

    The issue is simple. No mater which level of menu i am on the last item is always surrounded by an <li> tag unless that that is the active item. I am trying to make it just a plain html tag. My "row" Tpl is working properly for the other items, only the last item in each section is not complying with my wishes. I.e. in the following menu:

    Department
    IT
    Sales
    Marketing
    Communications

    All of the items would be visually listed at the same level and surrounded by an <html> tag as I desire, except for Communications, unless communications it is the active item. I fudged around with the wayfinder command so much I don’t recall my original version -- promise not to laugh, but what I am currently using is:

    [!Wayfinder? &startId=`[[UltimateParent? &topLevel=`1`]]` &rowTpl=`PJhtmlinnerrowTpl` &outerTpl=`PJhtmlouterTpl` &parentRowTpl=`PJhtmlinnerrowTpl` &hereTpl=`PJhtmlinnerrowTpl` &innerRowTpl=`PJhtmlinnerrowTpl`!]

    like I said I’ve tried appending one all of the Tpl’s available that cover the row display.

    FWIW,

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

    and PJhtmlouterTpl is:
    [+wf.wrapper+]

    Any help with this would be greatly appreciated.


      • 17010
      • 20 Posts
      Zero responses after 9 days? Either I didn’t make my question clear or else it is more difficult than I thought. In any case I worked around it with an ugly hack using str_replace to remove the last <li>
        • 26931
        • 2,314 Posts
        Hi,

        No mater which level of menu i am on the last item is always surrounded by an <li> tag unless that that is the active item. I am trying to make it just a plain html tag.
        if that list item is active you probably got something like <li class="active"><a href="#">linktext</a></li>, what do you mean with "plain html tag?

        i’m not sure what you are trying to archieve, why would it be neccessary to have the last list-element not to be wrapped in <li>-tags, if you need to style the last element you can use &lastClass to apply a class

        cheers, j
          • 7231
          • 4,205 Posts
          I also don’t understand the question. Could you post the html markup that you want to achieve. This will help us visualize the objectives. wink
            [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]