Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
txp:article on indiv article context shouldn't output sticky article?
I supposed a <txp:article />
tag on an sticky individual article context was going to output the sticky article.
In other (coded) words, I supposed this was going to work fine:
<txp:if_article_list>
<txp:article form="article" status="sticky" limit="1" />
<txp:else />
<txp:article form="article" />
</txp:if_article_list>
The very simple idea behind the code is the tipical situation of outputting an sticky article on section landing page (an article list context) and a live/sticky article in individual article context.
In fact, long time ago, it worked. The second <txp:article />
will output the sticky article when on individual article context.
But then, I’ve a totally blurred idea that zem may have changed this behavior some month after my how-to post.
So, the questions are:
- shouldn’t it work?
- what could be a reason to have changed the old behavior? (or, better, is it a bug or the change was made on purpose?)
BTW, the “workaround” is this:
<txp:if_article_list>
<txp:article form="article" status="sticky" limit="1" />
<txp:else />
<txp:article form="article" status="sticky" />
<txp:article form="article" status="live" />
</txp:if_article_list>
It’s OK, I can live with the duplicated txp:article tag, but it feels a little awkward
Offline