Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-12-20 14:35:27

MarcoK
Plugin Author
From: Como
Registered: 2006-10-17
Posts: 248
Website

Related article by section

Hi.

I’ts a more time that i dont’use textpattern because the work it’s down.
A little question.
<txp:related_article /> work with category. But if I need extract all others articles by the same section except the individual one?

Thankyou

Offline

#2 2014-12-20 15:05:34

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: Related article by section

Hi Marco, we’ve had a request here that I was involved in a little, I remembered. I’m not quite sure if that’s totally what you’re looking for but some techniques there might help you.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2014-12-20 18:47:25

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: Related article by section

If you want just related articles by section, i.e. other articles in the current section excluding the current section, and don’t need to combine it with any kind of related article tag, just use:

<txp:article_custom section='<txp:section />' limit="999" wraptag="ul" break="li" class="related_articles">
  <txp:if_article_id><txp:else />
    <txp:permlink><txp:title /></txp:permlink>
  </txp:if_article_id>
</txp:article_custom>

Also shown in the docs here


TXP Builders – finely-crafted code, design and txp

Offline

#4 2014-12-22 15:08:09

MarcoK
Plugin Author
From: Como
Registered: 2006-10-17
Posts: 248
Website

Re: Related article by section

Thanks Uli and Jakob
I solved quickly creating a new plugin.
More easy for me…
Even if Jakob solution it’s very easy!!!

Last edited by MarcoK (2014-12-22 15:11:48)

Offline

Board footer

Powered by FluxBB