Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-11-09 11:26:12

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,536
Website GitHub Twitter

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

#2 2010-11-09 11:52:52

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

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

#3 2010-11-09 13:11:15

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,536
Website GitHub Twitter

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

#5 2010-11-09 13:25:49

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

#6 2010-11-09 13:44:11

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,536
Website GitHub Twitter

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

Board footer

Powered by FluxBB