Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-11-23 17:44:20

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 252
Website

How to know the context?

Hello,
I’m writing a contextual menu, where if I’m displaying article AA or section A, highlight div #aa, if I’m displaying article AB, highlight #bb etc. I’m loading the menu through output_form tag.

unfortunately I can do conditional if_article_id only within an article. I’m confused.

Thanks for suggestions…

Offline

#2 2010-11-23 17:55:03

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: How to know the context?

Manaus wrote:

unfortunately I can do conditional if_article_id only within an article.

You can use it outside of an article form (or tag) if you wrap it in <txp:if_individual_article> tags. Does that help you?

Offline

#3 2010-11-23 18:39:30

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 252
Website

Re: How to know the context?

Great! Thanks!

Offline

Board footer

Powered by FluxBB