<?php
$system->service->categories->execute;
my @categories = &go();
sub go
{
my $parent = shift || '0';
my $search = EasyHost::Search->prepare('categories','EasyHost::Category','parent_id = '.$parent);
$search->execute;
my @temp = ();
while (my $category = $search->fetch)
{
push(@temp,$category,&go($category->id));
}
return @temp;
}
foreach my $category (@categories)
{
?>