We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37914
    • 89 Posts
    Is there a posibility to use an other template for a parentRow on the second level?
    I know about the categoryFoldersTpl, but since you have to set rel="category" or template to blank this isn't the best solution..
    Is there any other solution to use a different parentRowTpl like a subParentRowTpl for the second level?
    I need this because the HTML of the first level contains elements that I dont use on the second level.
      • 37914
      • 89 Posts
      Anyone?
        • 22840
        • 1,572 Posts
        What's different on the second level ?

        If its just styling you could add a class to the second level using japery and style it with that class.

        Plus if its the second level can't you use ul li ul to target it ?

        Can you give a example of what your trying to do.
          • 37914
          • 89 Posts
          I know how to fix this the dirty/bad way, by CSS.
          But the right/clean way would be to remove the unneeded HTML.
          And that would be possible to have an alternative parentRow template for the second level.

          <ul class="navigation">
          <li class="has-sub"><a href="/" title="" class="button"><span>First level</span></a>
          <ul>
          <li class="has-sub"><a href="/" title="">Second level</a>
          <ul>
          <li><a href="/" title="">Third level</a></li>
          </ul>
          </li>
          </ul>
          </li>
          </ul>
            • 22840
            • 1,572 Posts
            Can you post what your actually trying to achieve as that doesn't look like dirty HTML to me, just nested ul > li's
              • 37914
              • 89 Posts
              Hi Paulp,

              That right, because it is the HTML I would like it to output.
              This is what MODx would output instead:

              <ul class="navigation">
              <li class="has-sub"><a href="/" title="" class="button"><span>First level</span></a>
              <ul>
              <li class="has-sub"><a href="/" title="" class="button"><span>Second level</span></a>
              <ul>
              <li><a href="/" title="">Third level</a></li>
              </ul>
              </li>
              </ul>
              </li>
              </ul>
                • 22427
                • 793 Posts
                Quote from: mdehaan at Jan 29, 2013, 04:42 PM
                I know how to fix this the dirty/bad way, by CSS.
                What is dirty/bad with CSS?
                  • 37914
                  • 89 Posts
                  By dirty I mean:
                  Make CSS remove stuff that shouldn't be there in the first place.
                  The class button shouldn't be on the second parentRow on the first place.
                  I could make the css work by overriding the styles on the second level, but that isn't the way it is supposed to work..

                  I've fixed the problem by not having the button class in the first place.
                  But it is a limitation not having the option to use different parentRow templates for different levels.

                  Quote from: ottogal at Feb 04, 2013, 05:01 PM
                  Quote from: mdehaan at Jan 29, 2013, 04:42 PM
                  I know how to fix this the dirty/bad way, by CSS.
                  What is dirty/bad with CSS?
                    • 22427
                    • 793 Posts
                    You can use the &levelClass property - see the Wayfinder Demo: Click the label of the checkbox "levelClass" in the left column to open a box with explanations.
                      • 37914
                      • 89 Posts
                      Thanx ottogal,
                      This will be useful for some other projects for sure.

                      But I will put in a feature request also smiley

                      Quote from: ottogal at Feb 04, 2013, 05:38 PM
                      You can use the &levelClass property - see the Wayfinder Demo: Click the label of the checkbox "levelClass" in the left column to open a box with explanations.