Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [Gorospe] Category Logo

Quote Reply
Re: [Gorospe] Category Logo In reply to
Ok, there was a typo in the global - and also a couple of other things.

1) The global should be:

Code:
sub {
if (length($_[1]) > 1) { return $_[1]; }
my @cats; my @back;
foreach (split /\//, $_[0]) {
push @back, $_;
push @cats, join ("/", @back);
}

foreach (reverse @cats) {
my $html = $DB->table("Category")->select( ['Header_HTML'], { Full_Name => $_ } )->fetchrow || '';
if (length($html) > 1){ return $html; }
}

}

2) It should be called BEFORE include_header.html
3) The way to call it is with:

Code:
<%if not Header_HTML%>
<%set Header_HTML = get_category_header_html($Full_Name,$Header_HTML)%>
<%endif%>

Its all working fine now Angelic

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!
Subject Author Views Date
Thread Category Logo Gorospe 4408 Feb 1, 2012, 6:52 AM
Thread Re: [Gorospe] Category Logo
Andy 4302 Feb 1, 2012, 7:19 AM
Thread Re: [Andy] Category Logo
Gorospe 4283 Feb 1, 2012, 7:31 AM
Thread Re: [Gorospe] Category Logo
Andy 4277 Feb 1, 2012, 7:54 AM
Thread Re: [Andy] Category Logo
Gorospe 4279 Feb 1, 2012, 7:58 AM
Thread Re: [Gorospe] Category Logo
Andy 4287 Feb 1, 2012, 8:00 AM
Thread Re: [Andy] Category Logo
Gorospe 4274 Feb 1, 2012, 8:07 AM
Post Re: [Gorospe] Category Logo
Andy 4280 Feb 1, 2012, 8:11 AM
Post Re: [Gorospe] Category Logo
Andy 4276 Feb 1, 2012, 8:33 AM