Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-02-07 21:47:19
- lister
- Member
- Registered: 2008-02-13
- Posts: 76
list of navigation menus with added seperator?
Hi everyone,
I have a list of nav links using:
<txp:section_list active_class=“my_active_class” break=“li” class=”“ default_title=“home” sections=“artists,exhibitions,” include_default=“1” wraptag=“ul”/>
I was wondering how you go about adding seperators eg: artists “ | “ exhibitions etc..?
Thanks
lister
Offline
#2 2009-02-08 00:43:50
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: list of navigation menus with added seperator?
Try this (not tested)
<txp:section_list active_class=“my_active_class” break=“li” class=”“ default_title=“home” sections=“artists,exhibitions,” include_default=“1” wraptag=“ul”>
<txp:category />
<txp:if_last_category>
<txp:else />
|
</txp:if_last_category>
</txp:section_list>
… and then “linearize” the ul with css or, in a less semantic way, use the same code stripping ‘wraptag=“ul”’ and changing ‘break=“li”’ with ‘break=”“’
Last edited by redbot (2009-02-08 01:01:10)
Offline
Re: list of navigation menus with added seperator?
Two ways:
1) If you want the vertical separator instead of a ul-li list, then simply declare it as the break attribute and set wraptag to nothing, e.g.:
<txp:section_list break=" | " default_title="home" sections="artists,exhibitions," include_default="1" wraptag="" active_class="my_active_class" />
2) If you want the ul-li list, you can achieve the separator with css using li { float:left;}
and li:before { content: "|";}
and then adjust padding around your a-links. You can also use border-left: 1px solid gray;
to create a vertical bar whose height you can adjust by varying the li, respective a anchors, depending upon what you attach it to.
TXP Builders – finely-crafted code, design and txp
Offline
#4 2009-02-08 01:11:59
- lister
- Member
- Registered: 2008-02-13
- Posts: 76
Re: list of navigation menus with added seperator?
Thanks guys, really appreciate the help..
Offline