Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2009-02-14 03:11:41
- keoshi
- Member
- From: Portugal
- Registered: 2006-04-30
- Posts: 53
menu active state
Hey everyone!
This is the scenario,
I want to have a section specific two-level ul menu and I need TXP to send two values, one for the second level ul, another to the second level li; let’s imagine it’s the classes .activeul and .activeli
for example:
<ul>
<li>
<ul>
<li><a href="#">First</a></li>
<li><a href="#">Second</a></li>
</ul>
</li>
<li>
<ul class="activeul">
<li><a href="#">First</a></li>
<li class="activeli"><a href="#">Second</a></li>
</ul>
</li>
<li>
<ul>
<li><a href="#">First</a></li>
<li><a href="#">Second</a></li>
</ul>
</li>
</ul>
Now, can I send values from an article (say custom fields) and propagate them on a presentation page?
Also, how could I update this menu by simple writting an article? Is there any plugin that dynamically does that?
I dunno if this is possible, I’m counting on you guys to help me out.
Thanks in advance,
Filipe
P.S.: I can’t use if_section because this menu is all inside a single section.
Last edited by keoshi (2009-02-14 03:40:28)
Offline
#2 2009-02-15 00:44:51
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: menu active state
You could probably use if_article_id instead of if_section, but how to make it dynamic depends on how the menu is organized. I assume the second level is articles, but what is the first level if all articles are in the same section?
Offline
#3 2009-02-15 01:12:29
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: menu active state
Hi keoshi,
Would either of these help: adi_menu, adi_cat_menu?
Offline
#4 2009-02-15 02:05:40
- keoshi
- Member
- From: Portugal
- Registered: 2006-04-30
- Posts: 53
Re: menu active state
Els: the first level are just imaginary sub-divisions of the section (imagine ‘portfolio’ divided in ‘web’, ‘identity’ and ‘print’).
By the way, if_article_id is a really good idea, now I just have to come up with a way to ‘activate’ the first level.
gomedia: those are great, but don’t really offer me much options unless I change the PHP code. I’d like to go with a TXP-only solution if possible.
Thank you both!
Offline
Pages: 1