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

    i am having a little trouble creating the navigation as i need it for my markup.

    i have a top nav with: ul>li*10 (got this!)
    a sidebar nav with only a*10 tags (only anchor tags, the wrapper is a div)
    and an other top nav, which is as well a ul>li*3 (got this!)

    so what i need is this in wayfinder markup.. smiley

    <div class="list-group">
    <a href="#" class="list-group-item"> Framework</a>
    <a href="#" class="list-group-item active">Management</a>
    <a href="#" class="list-group-item">Designer</a>
    <a href="#" class="list-group-item"> WEB</a>
    <a href="#" class="list-group-item">Option</a>
    </div>

    anyone an idea how to do this? [ed. note: phil_1990 last edited this post 10 years ago.]
      • 42802
      • 96 Posts
      Sebastian Zahn | ingroove.uy Reply #2, 10 years ago
      Hi!

      Try this: Define your own outerTpl and rowTpl chunks ( use your own name ) and call them in your wayfinder script.

      For example, if you don´t want de "<ul>" as a wrapper. Example:

      outerTpl

      Before
      <ul id="topnav"[[+wf.classes]]>[[+wf.wrapper]]</ul>

      After
      <div class="list-group">[[+wf.wrapper]]</div>

      And to delete the "li" elements:

      rowTpl

      Before
      <li[[+wf.id]][[+wf.classes]]><a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]>[[+wf.linktext]]</a>[[+wf.wrapper]]</li>

      After
      <a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]>[[+wf.linktext]]</a>

      Something like that, i don´t test it, try and experiment, you have to set the active link class too.

      This will help: http://rtfm.modx.com/extras/revo/wayfinder

      Good Luck.

      Sebastián.
        • 47485
        • 5 Posts
        awesome.

        Got that far nearly by myself, but maybe you can help me with another problem i encountered.

        My navigation looks like this:

        Top Nav: Home | navlink1 | ... navlinkX | Aktuelles

        if i navigate to navlink1 i get a second navigation and third navigation:

        One is for Categories:
        Category 1 | Category 2 | Category 3

        And another is for SubCategories

        SubCategory 1
        SubCategory 2
        SubCategory 3
        SubCategory 4

        If i Navigate to "navlink1" the Category 1 and SubCategory 1 should be active smiley

        any clue? or is it best practice to make "navlink1" a syslink and link it to an id?
          • 42802
          • 96 Posts
          Sebastian Zahn | ingroove.uy Reply #4, 10 years ago
          Check activeParentRowTpl in the docs, maybe help.

          http://rtfm.modx.com/extras/revo/wayfinder

          Sebastián.
            • 47485
            • 5 Posts
            Thanks for the point in that direction,

            but since i need the content as well i should make a top to bottom redirect? no? Thus i should point the Ressource to the sub levels first item. Can i do this with wayfinder as well (change the link?)

            activeParentRowTpl

            Seems to only affect the style, which would be bad without content or i would need to copy content / reference content?