We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31255
    • 118 Posts
    Working Foundation top-bar (v. 5.2.2)

    See documentation for top-bar at http://foundation.zurb.com/docs/components/topbar.html

    You don`t need all tpls (only rowtpl is needed) if you like titles in links. I don`t wink. Just classes needed to work.

    WF call:
    [[Wayfinder?  &startId=`0` &level=`2` &outerClass=`right` &innerClass=`dropdown` &parentClass=`has-dropdown` &lastClass=`end` &hereClass=`active` &rowTpl=`f5.rowTpl-top-bar.tpl` &innerRowTpl=`f5.navInnerTpl-top-bar.tpl` &outerTpl=`f5.navOuterTpl.tpl`]]


    &outerClass=`right` depends where you want your navigation in top-bar. And may work without &lastClass=`end`.

    Tpl chunks (tpls without titles):

    innerRowTpl:
    <li> <a href="[+wf.link+]" [+wf.attributes+]>[+wf.linktext+]</a> [+wf.wrapper+] </li>


    outerTpl:
    <ul [+wf.classes+]>[+wf.wrapper+]</ul>


    rowTpl:
    <li class="divider"></li>
    <li class="[+wf.classnames+]"> <a href="[+wf.link+]" [+wf.attributes+]>[+wf.linktext+]</a> [+wf.wrapper+] </li>
    [ed. note: valokammi last edited this post 9 years, 11 months ago.]
      Tassu, webmaster of Valokammi
    • Try If extra?



        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 13226
        • 953 Posts
        Take a look at this post its about Wayfinder
          • 31255
          • 118 Posts
          Well those chunks don`t help, because needed that output modifier for classes, like in chunk above.

          This is so close, child links render ok, problem is that without necessary classes top-bar don`t work like it should.

          And that output modifier is must, because top level links can be two different state, depending is there child pages. [ed. note: valokammi last edited this post 9 years, 11 months ago.]
            Tassu, webmaster of Valokammi
            • 31255
            • 118 Posts
            Now I have tried these variations:

            <li class="[+wf.classnames+] [[if? &is=`[+wf.classnames+]:and:(isfolder):is:1` &then=`has-dropdown`]]"> <a href="[+wf.link+]" [+wf.attributes+]>[+wf.linktext+]</a> [+wf.wrapper+] </li>


            and

            <li class="[+wf.classnames+] [[if? &is=`(isfolder):is:1` &then=`has-dropdown`]]"> <a href="[+wf.link+]" [+wf.attributes+]>[+wf.linktext+]</a> [+wf.wrapper+] </li>


            Tried [(isfolder)] too.

            I made chunk for has-dropdown (chunk just have text has-dropdown) and tried &then=`@TPL:has-dropdown`.

            All ways renders all ok, but attribute class is empty. [ed. note: valokammi last edited this post 9 years, 11 months ago.]
              Tassu, webmaster of Valokammi
              • 31255
              • 118 Posts
              Noticd that I had incorrect tags for resource field which is [*isfolder*]. Still Class rendered empty when needed.

              My present chunk look like this:
              [[if? &is=`[*isfolder*]:is:1` &then=`<li class="[+wf.classnames+] has-dropdown"> <a href="[+wf.link+]" [+wf.attributes+]>[+wf.linktext+]</a> [+wf.wrapper+] </li>` &else=`<li class="[+wf.classnames+]"> <a href="[+wf.link+]" [+wf.attributes+]>[+wf.linktext+]</a> [+wf.wrapper+] </li>`]]


              Still empty class.

              I put "ugly way" solution at the start of topic. It`s not what it should be, but it works.

              And still want to solve this- [ed. note: valokammi last edited this post 9 years, 11 months ago.]
                Tassu, webmaster of Valokammi
                • 36416
                • 589 Posts
                Quote from: valokammi at May 28, 2014, 07:21 PM
                Noticd that I had incorrect tags for resource field which is [*isfolder*]. Still Class rendered empty when needed.

                This won't work: [*isfolder*] is syntax for the current resource where menu is shown, not current menu item iteration...

                Have you seen parameter parentClass?
                &parentClass=`has-dropdown`
                  • 31255
                  • 118 Posts
                  Bang! It works. Thanks Eoler.
                    Tassu, webmaster of Valokammi