We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29332
    • 80 Posts
    I’m not sure if this is the right place to post this, so I apologize if it isn’t.

    I have a style set for unordered lists and when I code the list with html, it displays correctly. When I add the WayFinder elements, the style sheet doesn’t match. (see attachment)

    Here is the code of the chunk:
    <li[+wf.id+][+wf.classes+]>
    <a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>
    [+wf.linktext+]</a>
    [+wf.wrapper+]
    </li>


    here is the code for the template with WayFinder
    <ul class="leftNavItem">
        		[[Wayfinder? &startId=`1`]]
    </ul>


    Here is the code without WayFinder
    <ul class="leftNavItem">
                    
                    <li><a href="home.shtml">Home Cleaning Services</a></li>
                    <li><a href="#">Commercial Cleaning Services</a></li>
                    <li><a href="#">Property Preservation</a></li>
                    <li><a href="#">Why choose Value Cleaning?</a></li>
        		</ul>


    Anyone know what I’m doing wrong?
      Teaching myself MODx
      • 36571
      • 145 Posts
      What do your Wayfinder templates look like?

      Have a look at the outputted source code. I think Wayfinder may be adding some classes of its own, and that is why it does not behave as it should with your existing CSS declarations.
        • 4310
        • 2,310 Posts
        <li[+wf.id+][+wf.classes+]>
        Will add the Wayfinder default id & classes to your html <li>’s.
        The example you give shows no classes or id’s are needed.
          • 29332
          • 80 Posts
          Quote from: bunk58 at Nov 11, 2009, 12:21 PM

          <li[+wf.id+][+wf.classes+]>
          Will add the Wayfinder default id & classes to your html <li>’s.
          The example you give shows no classes or id’s are needed.


          I took those two elements out and nothing changed.
            Teaching myself MODx
            • 4310
            • 2,310 Posts
            What is Wayfinder producing as output?
              • 29332
              • 80 Posts
              What do you mean? It shows the correct links but it adds a bullet and indents the list.
                Teaching myself MODx
                • 4310
                • 2,310 Posts
                If Wayfinder is outputting a plain un-ordered list as required, then it’s likely to be a CSS issue.
                  • 3707
                  • 241 Posts
                  Are you getting nested lists in your output?

                  Your Wayfinder call is placed inside <ul> tags but Wayfinder wraps the output in <ul> tags by default which would create a nested list.

                  Try moving your <ul> tags into an outerTpl chunk:
                  [[Wayfinder? &startId=`1` &outerTpl=`leftNav`]]

                  leftNav chunk:
                  <ul class="leftNavItem">
                  	[+wf.wrapper+]
                  </ul>

                    • 29332
                    • 80 Posts
                    Quote from: bob1000 at Nov 11, 2009, 05:11 PM

                    Are you getting nested lists in your output?

                    Your Wayfinder call is placed inside <ul> tags but Wayfinder wraps the output in <ul> tags by default which would create a nested list.

                    Try moving your <ul> tags into an outerTpl chunk:
                    [[Wayfinder? &startId=`1` &outerTpl=`leftNav`]]

                    leftNav chunk:
                    <ul class="leftNavItem">
                    	[+wf.wrapper+]
                    </ul>



                    I used the example you gave me, and it didn’t use the style. How do I tell it to use the correct style?
                      Teaching myself MODx
                      • 3707
                      • 241 Posts
                      Post back the Wayfinder call you are using, any template chunk code and the CSS code for the menu and we can take a look.