Forum OpenACS Q&A: how to limit list builder results dynamically

hi all, i want to limit the list builder results dynamically, that means giving the user the option that how many rows he wants see in a page, currently i am using ad_form with select element where user can choose the size then i am setting the value using ad_conn set my_var $my_var . Then reading that variable set my_var [ad_conn my_var] and using that value -page_size $my_var in listbuilder.

Is there any better way to do it.. using listbuilder itself??

Collapse
Posted by Malte Sussdorff on
Yes there is a better way. It is a switch called page_size_variable_p, which, if set to 1, allows the users to define how many values they are going to see.
I tried it. but no success :( .. i updated list-procs.tcl and util-procs.tcl..but it's showing any select box.
it's calling template::util::list_to_multirow to create the options..does we need to fix any code..or any other parameters to list builder.

template::list::create -name get_xyz -multirow xyx -page_size_variable_p 1 -page_query_name get_content_items_id -page_flush_p 1 -elements \
{
title {
label "title"
}
description {
label "Description"
}

}

Thank you,
Sriharsha

Is there any example where we can see this parameter working?
Collapse
Posted by Dave Bauer on
grep "-page_size" in the source of OpenACS for examples.