-
- 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
. 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
-
- 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
-
- 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
-
- 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
-
- 118 Posts
Bang! It works. Thanks Eoler.
Tassu, webmaster of Valokammi