Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [tga] <%if $global eq 'value'%>

Quote Reply
Re: [tga] <%if $global eq 'value'%> In reply to
Hi,

You probably need something like;

Code:
sub {
my ($name, $redakteur) = split /\//, $_[0];
my $result = 0;
if ($redakteur eq 'redakteur'){
$result = 1;
}
return { tmp_result => $result };
}

Code:
<%redakteur('re/redakteur')%>
<%if tmp_result%>
first
<%endif%>

<%redakteur('re')%>
<%if tmp_result%>
second
<%endif%>

Basically, you can't do inline comparison ... i.e;

<%if test_global($catID)%>
yes
<%endfi%>

..but the global would return false, all the time (as the routine hasn't been executed).

Hope that helps.

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 <%if $global eq 'value'%> tga 1679 May 26, 2005, 11:26 PM
Post Re: [tga] <%if $global eq 'value'%>
Andy 1610 May 27, 2005, 12:58 AM