Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-08-13 07:09:18

peterj
Member
From: Melbourne, Australia
Registered: 2005-06-02
Posts: 99

txp:category & txp:category_list tangling?

Hoping someone might spot the error of my ways. I have been scratching head for hours over this and can’t find a related discussion.

I am on a category page say ?c=aaa-2009

Using txp:category outputs the correct category when I place near the top of the <body>. Incorrect when placed at the bottom.

Sprinkling txp:category tags throughout the page code, I can see the correct category is being lost in the menu code where txp:category_list is used to display some subcategories – including the page’s own category.

The output from <txp:category /> changes to match the current category_list category after each loop through.

Is this intentional ?

I’m using txp 4.0.7 still for this site.

I have worked around the problem for now by collecting the category into a txp:variable before the menu code.

Offline

#2 2009-08-13 08:37:42

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,454
Website GitHub

Re: txp:category & txp:category_list tangling?

peterj wrote:

Using txp:category outputs the correct category when I place near the top of the <body>. Incorrect when placed at the bottom…. I can see the correct category is being lost in the menu code where txp:category_list is used…

From memory I think there was a bug in category_list that caused this behaviour in 4.0.7. It was fixed in 4.0.8.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB