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
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