Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Limit bug in txp:article_custom?[SOLVED]
Hi
I dont know if this is really a bug but in an 4.3 install i use:
<txp:article_custom limit="3">
<div class="headline">
<txp:excerpt />
</div>
</txp:article_custom>
When i have only 2 news i get an extra code <div class=“headline”> </div>
is this normal?
Last edited by Dragondz (2010-11-09 13:44:31)
Offline
Re: Limit bug in txp:article_custom?[SOLVED]
It would be normal if you had 3 or more articles but one of the first 3 didn’t have an excerpt.
<txp:article_custom limit="3">
<txp:if_excerpt>
<div class="headline">
<txp:excerpt />
</div>
</txp:if_excerpt>
</txp:article_custom>
Code is topiary
Offline
Re: Limit bug in txp:article_custom?[SOLVED]
Hi Jeff
There is only 2 articles in category news and both with excerpt
Offline
#4 2010-11-09 13:21:11
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: Limit bug in txp:article_custom?[SOLVED]
You have to define section and category in article_custom
.
Offline
Re: Limit bug in txp:article_custom?[SOLVED]
Dragondz wrote:
bug
Unlikely. Just to be sure I ran tests, and I can’t reproduce. The listing ends to set the limit
or to the last matching row (article). SQL query was done correctly and article_custom returns what it should.
There is only 2 articles in category news and both with excerpt
In your example you are not defining category
attribute. The articles will be fetched from any category and section. If you are still having problems, could you post your tag trace from the problem page?
Offline
Re: Limit bug in txp:article_custom?[SOLVED]
Ha ha ha, i am a dumb!
You are right Jukka (and GugUser), the problem was in not defining a category in article_custom
All is fine know sorry for wasting your time
Offline