Melih:...I am not sure how can i do that. I don't understant
...
Hi Melih, sorry. From the first part of the thread:
Melih:
Hello,
I need help again.
I made a module. ........
I thought you were more comfortable working in PHP than in the templates.
What I've outlined above is a way to pass the template variables back to the module so you can work with them at that level instead of the template level. Its just another way of doing the same thing.
If you look in the templates you see {jrCore_list} around alot, right? Well that is just a smarty function. It allows you to pass in something and get something else back.
{jrCore_list module="jrAudio"} in the templates is just a smarty function that goes and searches the datastore of the jrAudio module and returns some pre-formatted items.
So from what I understand, the problem is: You have a variable that when put into your template will output "1,2,3,12,32". I don't know what the name of that variable is so I'll call it {$wanted_ids}.
I would have expected that the order would be preserved too, but if you wanted to take control of the order you could do it by passing that variable into a custom function in your module and then once the results came back add an extra bit of sorting to it.
-- just went to check--
Its working for me
{jrCore_list module="jrProfile" search="profile_id IN 2,1,3"}
{jrCore_list module="jrProfile" search="profile_id IN 1,2,3"}
{jrCore_list module="jrProfile" search="profile_id IN 3,2,1"}
all produce different results. They show in the order the numbers come. Are they not for you
@Melih ?
-- update --
Remove the _ before profile.
{jrCore_list module="jrProfile" search="_profile_id IN 2,1,3"}
{jrCore_list module="jrProfile" search="_profile_id IN 1,2,3"}
{jrCore_list module="jrProfile" search="_profile_id IN 3,2,1"}
all produce the SAME order. So remove the _ before _profile and the order works. Not sure why, I would have expected they would be the same searches. mmmm.
updated by @michael: 11/22/14 10:19:39PM