Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-07-29 20:40:15

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

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 themeMinimum 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

#2 2011-07-29 20:53:01

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,001
Website GitHub

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

#3 2011-07-29 21:08:09

PascalL
Member
From: Switzerland
Registered: 2009-03-09
Posts: 132
Website

Re: txp:article will not take variable for limit attribute

As Jakob said:
Parsed_attribute_values

Offline

#4 2011-07-30 04:43:30

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

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 themeMinimum 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

Board footer

Powered by FluxBB