We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38537
    • 34 Posts
    hey there,

    i have a navigation in this form:

    page
    + site 1
    + + site 4
    + + site 5
    + + site 6
    + site 2
    + + site 7
    + + site 8
    + + site 9
    + site 3
    + + site 10
    + + site 11
    + + site 12

    for example. when i'm on site 5. i became the subnavigation from site 1. thats ok so.
    the link is in this form:
    <li><a href="" title="">site x</a></li>


    but i need in the a-tag a class, with numbers from 0 to ...

    so the subnavigation should became a numbering..

    hmh, u know what i mean?

    i need a link in this form:
    <li><a href="" title="site 4" class="slide1">site 4</a></li>
    <li><a href="" title="site 5" class="slide2">site 5</a></li>
    <li><a href="" title="site 6" class="slide3">site 6</a></li>
      • 1778
      • 659 Posts
      Hi,
      Have a look at http://www.gregorysmart.com/2009/05/02/modx-wayfinder-snippet-e-book/

      and especially to the "The Almost Complete Guide to Creating Menus in MODx using Wayfinder" pdf file...

      I think it will be very helpful...
      Cheers
        • 4172
        • 5,888 Posts
        I'm not sure, if wayfinder has a counter for its items, I think not.
        But you can try to use getResources for your subResources and its
        [[+idx]]
        placeholder
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 1778
          • 659 Posts
          @bruno, yes I think it has one (from the guide)

          The [+wf.id+] placeholder
          The unique id created by Wayfinder using the &rowIdPrefix will be inserted where the [+wf.id+] placeholder appears in you Wayfinder template. Hence, you need to be careful where you place this placeholder for your menu items’ ids to be placed in the correct position. You also need to place it in the correct Wayfinder template. For instance, you probably do not want to have it in the &outerTpl since this template is not used to create menu row level items. It is also not very helpful to place it in a template that will only be used in certain cases and not others, for instance within the &hereTpl. You therefore want to probably use this placeholder in your &rowTpl or &innerRowTpl.

          Cheers
            • 4172
            • 5,888 Posts
            [[+wf.id]] 


            will show the resource-id, but not a counter-like value, which begins at 1 at every parent.
            another idea may be to use the menuindex-placeholder.
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!