Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-02-19 08:32:55

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Retriving links by article category

I’ ve places a link menu containing links directed to an external zone of my blog. To retrieve this link I tought I could have retrieved the links by the ‘actual’ article category.

Something like this:

<txp:linklist category=’<txp:category />’ limit=“2” form=“article-bottomlink-asset” />

I have in this case two links in each category, matching with article catecory and recalled by the form ‘article-bottomlink-asset’.

If I reorganize the articles in tematic sections and recall the links above by article section, as follow, all this works:

<txp:linklist category=’<txp:section />’ limit=“2” form=“article-bottomlink-asset” />

Why does not work retrieving link by article category?

Last edited by Bongo-man (2012-02-19 08:33:37)

Offline

#2 2012-02-19 09:55:20

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,001
Website GitHub

Re: Retriving links by article category

The first case should work if you are on an article list page and currently showing articles in a specific category. txp:category /> should show you the current category name as shown in the URL with ?c=cat-name-here.

But if you want to show those links at the end of an individual article, you’ll need to use <txp:category1 /> or <txp:category2 /> instead.

You can test these things by outputting <txp:category /> (or <txp:category1 /> etc.) temporarily on your page in the line above the tag.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2012-02-19 10:06:01

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: Retriving links by article category

Ok, thank you very much, Jacob, it works fine, in my case, using category1.

Offline

Board footer

Powered by FluxBB