Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
txp:article will not take variable for limit attribute
I might have discovered a strange bug with either my theme or with txp:article/txp:older
On my main page I use this snippet
<txp:article form="yoko_sticky_articles" limit="1" status="sticky" pgonly="0" />
<txp:article form="yoko_articles" limit="<txp:variable name="number_of_articles_on_frontpage" />" pgonly="0" />
<txp:output_form form="yoko_navbelow" />
The yoko_navbelow form contains this:
<txp:if_article_list>
<div class="nav-previous"><txp:older><span class="meta-nav">←</span> Older posts</txp:older></div>
<div class="nav-next"><txp:newer>Newer posts <span class="meta-nav">→</span></txp:newer></div>
</txp:if_article_list>
Generally the variable works, verified this with different settings. But <txp:older />
does not return anything, so does <txp:newer />
. Did I o something wrong or could it be an issue with older/newer? If I set a number for limit (e.g. limit=“5”) txp:older works just fine…
Yoko for Textpattern – A free blog theme • Minimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often
Offline
Re: txp:article will not take variable for limit attribute
Does using single quote syntax for tags-in-tags help?
<txp:article form="yoko_articles" limit='<txp:variable name="number_of_articles_on_frontpage" />' pgonly="0" />
TXP Builders – finely-crafted code, design and txp
Offline
Re: txp:article will not take variable for limit attribute
As Jakob said:
Parsed_attribute_values
Offline
Re: txp:article will not take variable for limit attribute
Wonderful, this works just as expected. Thanks a lot for the great (and super quick) support!
Yoko for Textpattern – A free blog theme • Minimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often
Offline