Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-17 05:47:14

mattmikulla
Member
From: Nashville Tennessee
Registered: 2004-08-25
Posts: 281
Website

Conditional tag problem. Need help with the logic.

I need to figure out how to work out a conditional tag problem and I’ve tried several scenarios and nesting schemes.

If I am at a section front then only display “welcome to this section”
If I select a category then display only the articles from that category
If an article is selected from the category article list then display only an individual article

I’ve been playing with txp:if_category and txp:if_individual_article but I just can’t get it right.


Art Rogue – Fine Art Photography

Offline

#2 2007-12-17 05:54:09

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Conditional tag problem. Need help with the logic.

See if this works:

<txp:if_category>
	<txp:article limit="10" />
<txp:else />
	<txp:if_article_list>
		Welcome to <txp:section title="1" />
	<txp:else />
		<txp:article />
	</txp:if_article_list>
</txp:if_category>

Offline

#3 2007-12-17 06:13:27

mattmikulla
Member
From: Nashville Tennessee
Registered: 2004-08-25
Posts: 281
Website

Re: Conditional tag problem. Need help with the logic.

Hey jm. Saw the pictures of your roof. That’s nuts. Hope all of that is worked out.

Where would the individual article fit in there? Is it in the if_article_list?


Art Rogue – Fine Art Photography

Offline

#4 2007-12-17 06:17:06

mattmikulla
Member
From: Nashville Tennessee
Registered: 2004-08-25
Posts: 281
Website

Re: Conditional tag problem. Need help with the logic.

Never Mind. It worked perfectly. I haven’t used the if_article_list conditional in a while.


Art Rogue – Fine Art Photography

Offline

Board footer

Powered by FluxBB