2012-06-25 22:52:52

THE BLUE DRAGON
Member
mu
Real name: Gil Goldshlager
From: Israel
Known languages: English, Hebrew
Website

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

 

2012-06-25 22:59:56

maniqui
Moderator
omega
Real name: Julián
From: Buenos Aires, Argentina
Known languages: es,en

Re: Article_custom sort by variable

Hi Gil,

try sort='FIELD(ID,<txp:variable name="the_articles" />)'


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

 

2012-06-26 08:00:21

THE BLUE DRAGON
Member
mu
Real name: Gil Goldshlager
From: Israel
Known languages: English, Hebrew
Website

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

 

2012-06-26 13:32:30

maniqui
Moderator
omega
Real name: Julián
From: Buenos Aires, Argentina
Known languages: es,en

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!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

 

Powered by FluxBB