Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-03-10 12:39:33

johnnie
Member
Registered: 2007-03-10
Posts: 58

Contextual per-category article display

Hello! Since chh_article_custom is now defunct (it shows a heap of notices and no longer works in this TXP), I am wondering if anyone has found a solution to this very basc, fundamental problem:

My client’s site has one left and one right floater. I want the left one to contain different articles than the right one, so I made two categories: article_left and article_right. However, txp:article will not allow me to display per-category articles and txp:article_custom, which does allow this, is not contextual! How can I work around this? Is there a PHP hack? This stuff i rather fundamental and it seems rather odd that no easy function is provided for this. Am I missing something?

Offline

#2 2007-03-10 12:47:08

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

Re: Contextual per-category article display

Wrap the content of your article form in

<txp:if_article_category name="article_left">
regular form content
</txp:if_article_category>

The same in another form for article_right of course. Then call the articles with <txp:article listform="left-article-form" /> and <txp:article listform="right-article-form" />.

Offline

#3 2007-03-10 20:58:15

johnnie
Member
Registered: 2007-03-10
Posts: 58

Re: Contextual per-category article display

It did the trick. Bedankt ;)

Offline

Board footer

Powered by FluxBB