Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-06-23 15:34:13

ibadullah
Member
From: Kabul, Afghanistan
Registered: 2017-09-16
Posts: 49

How to list other related articles in individual article ?

I use textpattern 4.6.2
i want to list other articles through same keywords, when i open an article (individual article)
i tried and putted the following codes to default form, but the problem is that, it will effect to all articles which has no same keywords as well.


<txp:article_custom keywords='<txp:keywords />'>
          <p><txp:title /></p>
</txp:article_custom>

Offline

#2 2018-06-23 17:16:47

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

Re: How to list other related articles in individual article ?

Hi ibadullah,

Try this untested method

<txp:variable name="thesekeywords"><txp:article_custom id='<txp:article_id />'><txp:keywords /></txp:article_custom></txp:variable>
<txp:article_custom keywords='<txp:variable name="thesekeywords" />' limit="20" wraptag="ol" break="li"><txp:permlink><txp:title></txp:permilnk></txp:article_custom>

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

Offline

Board footer

Powered by FluxBB