Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
call an article which has no category set
Seems like a simple one, but it’s got me.
I want to call a sticky article within a section, but I only want to retrieve an article which doesn’t have any categories set.
Something akin to <txp:article_custom section="that-section" category="null/no-way/nothing-to-see-here" status="sticky" />
thanks in advance
Stu
Offline
Re: call an article which has no category set
Try inside your article form:
<txp:if_article_category>
<txp:else />
<!--
Here is my article tags for article that has no category set
-->
</txp:if_article_category>
And pull that article form + article with your article_custom
;)
Last edited by Gocom (2008-02-12 13:07:08)
Offline
Re: call an article which has no category set
Thanks Jukka, but it’s not quite doing what I want.
I’m trying to get 4 articles. This solution is only showing 2 bits of content.
I think maybe it’s returning both full and empty outputs – in this case it’s come across 2 articles in the first 4 which do have a category, so it’s just sending a blank article back in each case.
Offline