I'm really sorry. I distinctly remember writing this code, but now I can't find it in our source control, our in any existing version. Ugh!
Please replace site_html_category in Links/SiteHTML.pm with:
# --------------------------------------------------------
# Return parsed category page.
#
my $tags = shift;
$tags->{build_links_per_page} = $CFG->{build_links_per_page};
($tags->{category_first}) = $tags->{'category_name'} =~ m,/?([^/]+)$,;
# Find the proper template.
my $template = 'category.html';
my $cat_db = $DB->table('Category');
if ($cat_db->cols->{'CategoryTemplate'}) {
if ($tags->{CategoryTemplate}) {
$template = $tags->{CategoryTemplate};
}
else {
my $parents = $cat_db->parents ($tags->{ID});
foreach my $parent (@$parents) {
my $cat_info = $cat_db->get($parent);
if ($cat_info->{CategoryTemplate}) {
$template = $cat_info->{CategoryTemplate};
last;
}
}
}
}
my $output = Links::load_template ($template, $tags, { dynamic => 1 });
return $output;
}and it should work as expected. Again, I'm sorry about the mixup.
Cheers,
Alex
--
Gossamer Threads Inc.
Please replace site_html_category in Links/SiteHTML.pm with:
Code:
sub site_html_category { # --------------------------------------------------------
# Return parsed category page.
#
my $tags = shift;
$tags->{build_links_per_page} = $CFG->{build_links_per_page};
($tags->{category_first}) = $tags->{'category_name'} =~ m,/?([^/]+)$,;
# Find the proper template.
my $template = 'category.html';
my $cat_db = $DB->table('Category');
if ($cat_db->cols->{'CategoryTemplate'}) {
if ($tags->{CategoryTemplate}) {
$template = $tags->{CategoryTemplate};
}
else {
my $parents = $cat_db->parents ($tags->{ID});
foreach my $parent (@$parents) {
my $cat_info = $cat_db->get($parent);
if ($cat_info->{CategoryTemplate}) {
$template = $cat_info->{CategoryTemplate};
last;
}
}
}
}
my $output = Links::load_template ($template, $tags, { dynamic => 1 });
return $output;
}
Cheers,
Alex
--
Gossamer Threads Inc.