Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-09-13 06:50:25
- dazonic
- Member
- Registered: 2006-10-24
- Posts: 43
Section list items with different classes
Hi, i want use css image replacement in my section list, but also keep activeclass.
so i want to output this:
<ul>
<li><a class="home active" href="http://project.dazonic.net/">Home</a></li>
<li><a class="events" href="http://project.dazonic.net/events/">Events</a></li>
<li><a class="gallery" href="http://project.dazonic.net/gallery/">Gallery</a></li>
</ul>
i’m guessing it’ll involve a plugin? if someone could point me in the right direction that’d be great.
thanks!
Last edited by dazonic (2007-09-13 07:13:27)
Offline
Re: Section list items with different classes
IE.
<li><a class="events<txp:if_section name="events"> active</txp:if_section>" href="<txp:site_url />events/">Events</a></li>
Cheers!
Last edited by Gocom (2007-09-13 08:32:09)
Offline
#3 2007-09-13 09:38:58
- dazonic
- Member
- Registered: 2006-10-24
- Posts: 43
Re: Section list items with different classes
right on.
thanks heaps mate.
Offline
Re: Section list items with different classes
There are plugins that have such option – to add special style to currently active section
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
#5 2007-09-14 02:07:36
- dazonic
- Member
- Registered: 2006-10-24
- Posts: 43
Re: Section list items with different classes
active_class will do it, no need for plugins.
the problem was, i need a separate class for each item (for css image replacement) as well as a class when that section is active.
i thought there may have been a plugin that i could do something like…
<txp:xxx_badass_section_list wraptag="ul" break="li" section_as_class="1" active_class="active" />
Offline