Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-05-11 02:07:58
- scdoody
- Member
- Registered: 2006-10-18
- Posts: 129
Exclude articles based on category
How can I exclude articles that show up based on their category. To make things easy, I want to show articles from all categories except for one.
On my default page I have:
<txp:article limit=“5” />
<txp:if_individual_article>
<p><txp:link_to_prev><txp:prev_title /></txp:link_to_prev>
<txp:link_to_next><txp:next_title /></txp:link_to_next></p>
<txp:else />
<p><txp:older><txp:text item=“older” /></txp:older>
<txp:newer><txp:text item=“newer” /></txp:newer></p>
</txp:if_individual_article>
Then I have a default form that is this:
<h3><txp:permlink><txp:title /></txp:permlink><br /><txp:posted /></h3>
<txp:article_image thumbnail=“0” />
<txp:body />
<!—-<p>— <txp:author /></p>—->
<txp:comments_invite wraptag=“p” />
<div><img src=”<txp:site_url />images/1.gif” width=“400” height=“1” class=“divider” alt=”—-” title=”“ /></div>
What is the code to add that will exclude my one category?
Offline
#2 2007-05-11 03:46:15
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: Exclude articles based on category
Wrapping your article form contents in if_article_category in the proper fashion would probably do it, perhaps using the else clause?
Offline
Pages: 1