Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-07-24 17:31:50

pierlu
Member
Registered: 2014-08-12
Posts: 153

link other article

Under to every article of one determined section I would want to see the links of the other articles of the same section except what I am visualizing at that time.

Offline

#2 2015-07-24 17:45:56

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: link other article

pierlu wrote #293674:

Under to every article of one determined section I would want to see the links of the other articles of the same section except what I am visualizing at that time.

<txp:related_articles /> should be of help


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2015-07-24 18:22:13

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: link other article

colak wrote #293675:

<txp:related_articles /> should be of help

Nope, it will restrict itself to the same categories (1,2 or both) that the current article, though you can additionally filter them by sections.

Offline

#4 2015-07-24 19:22:04

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: link other article

etc wrote #293677:

Nope, it will restrict itself to the same categories (1,2 or both) that the current article, though you can additionally filter them by sections.

Hi Oleg, you are of course right. Here is the right code:

<txp:related_articles wraptag="ul" section='<txp:section />' break="li" />
<txp:title />
</txp:related_articles>

Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2015-07-24 20:24:14

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: link other article

I still think that it will search within the current article’s categories. In 4.6 you will be able to call <txp:article_custom section='<txp:section />' exclude='<txp:article_id />' />, but atm the only core way I see is

<txp:article_custom section='<txp:section />' />
<txp:if_article_id><txp:else /><txp:title /></txp:if_article_id>
</txp:article_custom>

Offline

Board footer

Powered by FluxBB