Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-08-13 07:42:49

davidwang
Member
From: Malaysia
Registered: 2005-01-25
Posts: 38
Website

Problem with txp:older on category pages

Hi guys, I’ve got a long list of articles in a category, and I’m looking to break them up and display them in pages. Please refer to www.gardenfairies.com.my/flowers/catalog to see what I mean. However the <txp:older> tags shows up as <txp:older>Prev Page</txp:older> | <txp:newer>Next Page</txp:newer> in the page source.

The template I use for the Flowers section is one big template with lots of conditionals to display the Flowers section mainpage, category pages (like the catalog one) and individual articles. Below is the relevant template code:

<txp:mdm_if_category category="catalog"><!-- category/catalog page -->
<h2><txp:c/></h2>
<txp:article_custom section="flowers" form="catalog" limit="12" />
<p><txp:older>Prev Page</txp:older> | <txp:newer>Next Page</txp:newer></p>
</txp:mdm_if_category>

I’m using <txp:article_custom> to call the catalog form and I’m running rc3.

What’s going on? Help!

Last edited by davidwang (2005-08-13 07:44:15)

Offline

#2 2005-08-14 01:22:27

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: Problem with txp:older on category pages

If there isn’t a reason to use article_custom, you may have better luck with article. My version at present will respond to an article tag with older and newer where it won’t article_custom.

Last edited by rsilletti (2005-08-14 01:23:01)

Offline

#3 2005-08-14 06:05:07

davidwang
Member
From: Malaysia
Registered: 2005-01-25
Posts: 38
Website

Re: Problem with txp:older on category pages

Yep, I figured that out the hard way. <txp:older> and <txp:newer> doesn’t work with article_custom, only article.

Offline

#4 2005-10-23 23:03:49

ywickham
Member
Registered: 2005-06-11
Posts: 38
Website

Re: Problem with txp:older on category pages

I’d like to revive this a bit, because I have a similar, if not the same problem. However, I can’t use txp:article custom, as it returns nothing on my pages. Is there someother tag that I can use to paginate my article listings with the txp:if_category_list and a txp:article_custom tag.

Here’s the code on my default page template.:

<code> &lt;txp:glx_if_category_list&gt; &lt;h3&gt;&lt;txp:upm_category_title /&gt;&lt;/h3&gt; &lt;txp:if_category name=“bracelets”&gt;

&lt;div id=“product_list”&gt;&lt;txp:article_custom listform=“excerpt_products” limit=“100” category=“Bracelets” /&gt;&lt;/div&gt; &lt;/txp:if_category&gt; &lt;txp:if_category name=“necklaces”&gt; &lt;div id=“product_list”&gt;&lt;txp:article_custom listform=“excerpt_products” limit=“100” category=“Necklaces” /&gt;&lt;/div&gt; &lt;/txp:if_category&gt; &lt;txp:if_category name=“earrings”&gt; &lt;div id=“product_list”&gt;&lt;txp:article_custom listform=“excerpt_products” limit=“100” category=“Earrings” /&gt;&lt;/div&gt; &lt;/txp:if_category&gt; &lt;br clear=“all” /&gt; &lt;/txp:glx_if_category_list&gt; </code>

<br />

Or do I need to re-write this code somehow?

Thanks!

Offline

#5 2005-10-25 00:43:59

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: Problem with txp:older on category pages

Your <code><txp:article_custom /></code> should return an article list by category as you have them coded, unless your conditional tags aren’t qualified or your section assignments won’t allow display. If what you are trying to do is generate pagination statistics for an article list, <code><txp:article pgonly=‘1” /></code> will do so without producing the list itself. (good for top positioning list statistics )?

Offline

#6 2005-10-25 12:44:00

ywickham
Member
Registered: 2005-06-11
Posts: 38
Website

Re: Problem with txp:older on category pages

I’m sorry, I wasn’t clear in my question. I just continued it from the previous posters, which I see now that makes no sense.

My code does return an article listing. (For the record, when I changed my txp:article_custom to txp:article and keep the same attributes, I get a blank page…that is, with or without the category attribute specified as well.) What I wasn’t able to do was to get txp:older and txp:newer to work with txp:article_custom. I read in an above post that those tags do not work with txp:article_custom.

My revised question is: Is there another way for me to get pagination back onto my pages with my current code (see post above) or do I need to re-write my code to get the pagination? And if so, how?

Thanks!

Offline

#7 2005-10-30 18:19:24

ywickham
Member
Registered: 2005-06-11
Posts: 38
Website

Re: Problem with txp:older on category pages

bump

Suggestions anyone?

Offline

#8 2005-10-30 19:47:52

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Problem with txp:older on category pages

If you have a look in the new Tags forum I have given a little piece of code to replace the <code><txp:category link=“1” /></code> tag in your article form which keeps the category list in the same section, and therefore the same template, as the original articles. I think that would allow you to use the txp:article tag for your listing.

Last edited by thebombsite (2005-10-30 19:49:42)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#9 2005-10-31 11:54:02

ywickham
Member
Registered: 2005-06-11
Posts: 38
Website

Re: Problem with txp:older on category pages

> thebombsite wrote:

> If you have a look in the new Tags forum I have given a little piece of code to replace the <code><txp:category link=“1” /></code> tag in your article form which keeps the category list in the same section, and therefore the same template, as the original articles. I think that would allow you to use the txp:article tag for your listing.

thebombsite,

In order to get your code to work, I had to upgrade to 4.0.2. Once I did, your code worked great and has allowed me to condense my pages. Thank you!

However, the txp:older pagination tags still do not work. Now I get a display for the link, but it is not clickable. See:

<a href=“http://www.aprettyrock.com/shop/?c=Bracelets”>Bracelets Category Page</a>

What am I missing? Suggestions? Thanks!

Offline

#10 2005-10-31 12:20:49

ywickham
Member
Registered: 2005-06-11
Posts: 38
Website

Re: Problem with txp:older on category pages

> ywickham wrote:

> However, the txp:older pagination tags still do not work.

Nevermind. It seems my CSS was blocking access to the link. I just played with it and fixed it.

Thank you for all your help!

Offline

#11 2005-10-31 13:27:56

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Problem with txp:older on category pages

Well if I ever want any pretty rocks I know a site that works. :grin:


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB