Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2011-10-26 21:12:25

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: need help with categories and article landing page.

I was assuming that

category='<txp:category />'

would put in the current category as found in the url if that page was arrived at from a permlink. guess it only tests that it’s in A category. even so the tag trace says false….


its a bad hen that wont scratch itself.
photogallery

Offline

#14 2011-10-26 21:30:53

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

Re: need help with categories and article landing page.

if_category will only return true if you’re on a category page. The page in question looks like an individual article page to me.

Offline

#15 2011-10-26 21:41:49

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: need help with categories and article landing page.

yes that’s the problem. I misuderstood what if category did. sorry for wasting time!


its a bad hen that wont scratch itself.
photogallery

Offline

#16 2011-10-26 21:44:49

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

Re: need help with categories and article landing page.

If you need to display articles in the same category as the current article, you can leave out the if_category part, move the article_custom tag inside the if_individual_article conditional, and change category='<txp:category />' to category='<txp:category1 />' (or category2). If there is no category1 (or 2), no articles will be displayed.

Offline

#17 2011-10-27 00:13:31

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: need help with categories and article landing page.

ahh. nice els thanks for that.


its a bad hen that wont scratch itself.
photogallery

Offline

Board footer

Powered by FluxBB