We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3475
    • 16 Posts
    I have to do image navigation with rollovers (each image is different) for a site I’m working on and I have it set up so that each li has a different class that sets the background image.

    One thing I’m having trouble with is the hereClass, which doesn’t seem to work when you already have a class defined on an li. Is there a way to make it so that hereClass adds to the other class (two classes)? I would think it would just add another class by default but it doesn’t seem to do that.
      • 5340
      • 1,624 Posts
      post your snippet call and chunks pls
        • 3475
        • 16 Posts
        Wayfinder:

        [[Wayfinder?startId=`0` &level=`1` &hereClass=`selected` &rowTpl=`my.InnerRowTpl`]]


        Chunk code:

        <li class="[+wf.description+]">
        <a href="[+wf.link+]"><img src="/assets/templates/smoores/images/blank.gif" border="0" width="96" height="93" alt="[+wf.title+]" />
        </a>[+wf.wrapper+]
        </li>


        I assume selected is not being added because the li already has a class.
          • 16183
          • 1,390 Posts
          Hi Bjorn,

          In a case like this you need the placeholder [+wf.classnmames+] and not [+wf.classes+]

          [+wf.classnames+] - outputs the just the class names (without class=" ")

          So, in you tpl/chunk code

          <li class="[+wf.description+] [+wf.classnames+]">
          <a href="[+wf.link+]">
          <img src="/assets/templates/smoores/images/blank.gif" border="0" width="96" height="93"
          alt="[+wf.title+]" />
          </a>[+wf.wrapper+]
          </li>


          Hope this helps smiley

          cheers/k
            • 3475
            • 16 Posts
            Thanks, that worked.
              • 16183
              • 1,390 Posts
              Glad it did wink

              cheers/k