Gossamer Forum
Home : Products : Gossamer Links : Discussions :

<%if $global eq 'value'%>

Quote Reply
<%if $global eq 'value'%>
Hi,

this is maybe a very simple question, but I can't get this to work.

I have a global, which checks if there is '/redakteur' is part of the given parameter.

My global is very simple and looks like:
sub {
my ($name, $redakteur) = split /\//, $_[0];
my $result = 'false';
if ($redakteur eq 'redakteur'){
$result = 'true';
}
return $result;
}


When i put into the template:
<%redakteur('re/redakteur')%>
<%redakteur('re')%>
the following comes to screen: yes no (the first string includes '/redakteur', the second not, that means the global works correctly)

But if I put in the template:
<%if redakteur('re/redakteur') eq 'yes'%>
first
<%endif%>
<%if redakteur('re') eq 'yes'%>
second
<%endif%>

both 'first' and 'second' are displayed on the screen. But the second one doesn't equal to 'yes'!!!
If I take <%if $redakteur...%> it doesn't work, too!

What's wrong with this <%if...%>-clause??

Thanks, Tina
Subject Author Views Date
Thread <%if $global eq 'value'%> tga 1649 May 26, 2005, 11:26 PM
Post Re: [tga] <%if $global eq 'value'%>
Andy 1582 May 27, 2005, 12:58 AM