Gossamer Forum
Home : Products : Gossamer Links : Discussions :

can I access hash_ref with variable in templates

Quote Reply
can I access hash_ref with variable in templates
Hi,

I am trying to access a variable I can Dump with another variable within a template.
I have the following in a Plugin:
Code:
$countries->{AT} = "Austria";
$countries->{CH} = "Swizerland";
$mycountry = "CH";
All of the above are available as template variables.
I am trying to do something like:
Code:
<%if countries.$mycountry%>
ok
<%else%>
not ok
<%endif%>
I would be happy to get a hint if there is a way to do what I am trying to do.

Cheers

n||i||k||o
Subject Author Views Date
Thread can I access hash_ref with variable in templates el noe 3959 Jan 28, 2015, 8:40 AM
Thread Re: [el noe] can I access hash_ref with variable in templates
el noe 3881 Jan 28, 2015, 8:48 AM
Thread Re: [el noe] can I access hash_ref with variable in templates
Andy 3847 Jan 29, 2015, 5:05 AM
Post Re: [Andy] can I access hash_ref with variable in templates
el noe 3813 Jan 30, 2015, 12:20 AM