Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-01-22 15:38:28

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,260
GitHub

Tag hackery: is there an equivalent to "if not an article"?

I’m wondering how I would do this: I’m using sections and articles on TXP 4.0.5 and I want to a) display the contents of a form if the thing being displayed is the root of the section…but if an individual article is being displayed within a section, b) display the contents of a custom field instead. It’s an either a) or b), not both – which is where I’m falling down.

Any ideas? Thanks in advance :)

Offline

#2 2008-01-22 16:08:56

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Tag hackery: is there an equivalent to "if not an article"?

Either if_individual_article or if_article_list, with an else tag.

Offline

#3 2008-01-22 16:10:04

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: Tag hackery: is there an equivalent to "if not an article"?

<txp:if_article_list>
     (a) 
<txp:else />
     (b)
</txp:if_article_list>

Offline

#4 2008-01-22 16:16:41

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,260
GitHub

Re: Tag hackery: is there an equivalent to "if not an article"?

Perfect – thank you heaps!

Offline

Board footer

Powered by FluxBB