Index: openacs.org-dev/www/templates/widgets/sites.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/www/templates/widgets/sites.tcl,v diff -u -r1.5 -r1.6 --- openacs.org-dev/www/templates/widgets/sites.tcl 14 Aug 2002 13:11:23 -0000 1.5 +++ openacs.org-dev/www/templates/widgets/sites.tcl 14 Aug 2002 14:32:19 -0000 1.6 @@ -3,16 +3,19 @@ # this probably costs too much when there are many sites. (olah) etp::get_content_items -package_id 3894 -result_name sites +#etp::get_content_items -package_id 3173 -result_name sites set total [template::multirow size sites] set n_sites 5 set sites_limit [expr $n_sites + 1] set groups [expr $total / $n_sites] -set offset [expr [ns_rand $groups] * $groups] +set offset [expr [ns_rand $groups] * $n_sites] +set orderby "upper(title)" + etp::get_page_attributes etp::get_content_items -etp::get_content_items -package_id 3894 -result_name sites -limit "$sites_limit OFFSET $offset" -#etp::get_content_items -package_id 3173 -result_name sites -limit "$sites_limit OFFSET $offset" +etp::get_content_items -package_id 3894 -result_name sites -orderby $orderby -limit "$sites_limit OFFSET $offset" +#etp::get_content_items -package_id 3173 -result_name sites -orderby $orderby -limit "$sites_limit OFFSET $offset"