Forum OpenACS Q&A: template::list::create and orderby

Collapse
Posted by Barry Books on
I've been trying to learn list::create and I'm having a problem with order by. I have a page that need an object_id as input but I can't figure out how to get -orderby to put that value into it's url.
I get
this_month?orderby=hit%5fdate%2casc
but I need
this_month?orderby=hit%5fdate%2casc&object_id=123
How do I get -orderby to add extra variables to it's url?
Collapse
Posted by Dave Bauer on
Barry,
See https://openacs.org/forums/message-view?message_id=115009

To add extra variables to the URL you need to add a filter.

-filters {
    object_id
}

to the template_list::create call. It is not the most elegant solution, but it works :) There is a bunch of great advice in that thread.

Collapse
Posted by Jade Rubick on
I think the correct syntax for filters is actually:

-filters {
    object_id {}
}

Dave's example will work, but only for one filter, I believe.