Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-11-11 19:57:25

Charlie Chalk
Member
Registered: 2005-09-06
Posts: 51

limit articles to the total amount for a catergory

Hi

I have a site here that was using the RSS multiple catergories plug in for the articles. I’ve now switched back to the default Textpattern article tag hoping it would solve this problem – it hasn’t.

The following code is on the “article” page:

<txp:article allowoverride=“0” form=“default-ad” limit=“1” offset=“1” pgonly=“0” searchall=“0” searchsticky=“0” sort=“Posted desc” status=“4” />

<txp:article form=“gad-list-ads” limit=“1” status=“4” />

<txp:article allowoverride=“0” form=“default-ad” limit=“1” offset=“2” pgonly=“0” searchall=“0” searchsticky=“0” sort=“Posted desc” status=“4” />

<txp:article allowoverride=“0” form=“default” limit=“2” offset=“3” pgonly=“0” searchall=“0” searchsticky=“0” sort=“Posted desc” status=“4” />

<txp:article allowoverride=“0” form=“default-ad” limit=“1” offset=“5” pgonly=“0” searchall=“0” searchsticky=“0” sort=“Posted desc” status=“4” />

<txp:article allowoverride=“0” form=“default” limit=“4” offset=“6” pgonly=“0” searchall=“0” searchsticky=“0” sort=“Posted desc” status=“4” />

If you click on the “blogs” catergory (which has 13 entries) you’ll see the first page of 10, but rather than there being 3 on the next page there is another page full (10).

Can someone please tell me what I’m doing wrong? I’m sure it’s something really obvious – but not to me!!

Thanks

CC

Offline

#2 2006-11-11 20:39:55

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: limit articles to the total amount for a catergory

Have you tried with Textpattern 4.0.4?


Alex

Offline

#3 2006-11-11 20:42:41

Charlie Chalk
Member
Registered: 2005-09-06
Posts: 51

Re: limit articles to the total amount for a catergory

Sorry, should have said what version I was working with – yes, this is 4.04.

Offline

#4 2006-11-11 20:57:44

Charlie Chalk
Member
Registered: 2005-09-06
Posts: 51

Re: limit articles to the total amount for a catergory

I’ve done a little more digging, and it seems to be the ‘limit’ and ‘offset’ settings that are causing the problems. Can anyone tell me if there is another way of intergrating google ads without textpattern getting confused with the number of articles it should display?

Offline

#5 2006-11-11 21:14:39

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: limit articles to the total amount for a catergory

I don’t think offset is causing the problem. You need to add to each article tag pageby="10", then it should work.

(I think you can leave out the pgonly and searchsticky attributes, because the default value for those is “0”.)

Offline

#6 2006-11-11 21:17:42

Charlie Chalk
Member
Registered: 2005-09-06
Posts: 51

Re: limit articles to the total amount for a catergory

Superb!

Thanks Els, that’s saved what little hair I have left!

Offline

Board footer

Powered by FluxBB