Hi,
You wanna update the sub-categories to use the same value as the parent one? Probably the best way would be with a global (so that it gets updated each time you change it);
get_category_header_html
if (length($_[1]) > 1) { return $_[1]; }
my @cats; my @back;
foreach (@split /\//, $_[0]) {
push @back, $_;
push @cats, join "/", @cats;
}
foreach (reverse @cats) {
my $html = $DB->table("Category")->select( ['Header_HTML'], { Full_Name => $_ } )->fetchrow || '';
if (length($html) > 1){ return $html; }
}
}
Then call with:
<%set header_html = get_category_header_html($Full_Name,$Header_HTML)%>
<%endif%>
*completly* untested... but should work
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
You wanna update the sub-categories to use the same value as the parent one? Probably the best way would be with a global (so that it gets updated each time you change it);
get_category_header_html
Code:
sub { if (length($_[1]) > 1) { return $_[1]; }
my @cats; my @back;
foreach (@split /\//, $_[0]) {
push @back, $_;
push @cats, join "/", @cats;
}
foreach (reverse @cats) {
my $html = $DB->table("Category")->select( ['Header_HTML'], { Full_Name => $_ } )->fetchrow || '';
if (length($html) > 1){ return $html; }
}
}
Then call with:
Code:
<%if not header_html%> <%set header_html = get_category_header_html($Full_Name,$Header_HTML)%>
<%endif%>
*completly* untested... but should work

Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!