Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Article_custom sort by variable
Hi,
I’m trying to sort article_custom in the same order as I entered the articles id’s to it,
<txp:variable name="the_articles" value="1,4,2,5,3" />
<txp:article_custom id='<txp:variable name="the_articles" />' time="any" sort='<txp:variable name="the_articles" />'>
<txp:article_id /><br/>
</txp:article_custom>
this isn’t working,
so I will love to know how to get this to work to keep the same order as in the variable please.
Offline
Re: Article_custom sort by variable
Hi Gil,
try sort='FIELD(ID,<txp:variable name="the_articles" />)'
Offline
Re: Article_custom sort by variable
Thanks works great :)
Is there a documentation page that I can explore and learn all these magic tricks please?
Offline
Re: Article_custom sort by variable
This particular, obscure trick was taught to us by ruud, developer emeritus.
You could browse the user documentation or TXPTips to see if you find more magic tricks. Then, share them!
Offline
Pages: 1