Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2013-01-28 18:56:41
- bashirnoori
- Member
- From: Afghanistan
- Registered: 2012-10-02
- Posts: 84
in related articles by kewords, don't show current article
HI,
I’ve created Related Articles and that shows the current article also, but i don’t want to show the current article.
I tried like the following:
<txp:article_custom keywords=’<txp:keywords />’ limit=“3”>
<txp:title />
</txp:article_custom>
also tried like this:
<txp:article_custom keywords=’<txp:keywords />’ offset=“1” limit=“3”>
<txp:title />
</txp:article_custom>
Offline
Re: in related articles by kewords, don't show current article
As long as you always get the current article in the results could you filter them this way?
<txp:variable name="currentArticle" value='<txp:article_id />'/> <!--assuming you're in an article form here-->
<txp:article_custom keywords='<txp:keywords />' limit="3">
<txp:if_variable name="currentArticle" value='<txp:article_id/>'>
<txp:else/>
<txp:title />
</txp:if_variable>
</txp:article_custom>
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#3 2013-01-29 10:41:45
- bashirnoori
- Member
- From: Afghanistan
- Registered: 2012-10-02
- Posts: 84
Re: in related articles by kewords, don't show current article
That works fine for me, Thanks a lot :-)
Offline