[ic] sorted (translated) categories - better ideas?

Gert van der Spoel ic at 3edge.com
Sun Sep 11 18:42:39 EDT 2005


Here some lines I wrote to show categories on the page in alphabetical 
order, also when they have been translated. It works fine, so no problems 
there. Just curious if anybody has any better/shorter/more efficient ideas 
to get the same result. 


[seti catlist][/seti]
[query sql="select category from products group by category" type=list]
 [seti catlist][msg][sql-param category][/msg]==[sql-param 
category],[scratch catlist][/seti]

 my @list = split(/\,/,$Scratch->{catlist});
 my ($trans,$orig,$output); 

 foreach my $tmpit (sort @list) {
   ($trans,$orig) = split(/\=\=/,$tmpit);
   $output .= '> [page search="se='. $orig .' sf=category"]'
              . $trans . '[/page]<br>';
 return $output;

More information about the interchange-users mailing list