Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-05-19 22:15:13

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

Re: Live and Sticky article in article list

lous wrote:

No :) I already got a category list on the left side of my page.

That TXP Tip is not about a category list :) I still think you can use at least part of it. Something like this:

<txp:article_custom status="sticky" category='<txp:category_list parent="your_parent_category" exclude="your_parent_category" break=""><txp:category /><txp:if_last_category><txp:else />,</txp:if_last_category></txp:category_list>' />

This will list the child categories of ‘your_parent_category’ as a comma separated list of values for the category attribute in the article_custom tag. So if the current category doesn’t have a sticky article, the sticky article of another child category of the same parent will be displayed.
But you need one more thing: a way to determine the parent of the current category. And for that you might want to investigate smd_parent. I’m not sure if it does what you need, I’ve never used it.

Offline

Board footer

Powered by FluxBB