Hi all
Got a small issue. I have a sub that returns a hashref to be used by a template to do lookups (validate states) without using too much DB ressources. My problem is that I don't know how to access this hash in the template tags (<%... %>).
I've tried the usual syntax : <% myhashref->{myitem} %> but this always returns 0, even for valid items.
Using the dump function of GT::Forum, I can see my Hash with all its values.
I've also tries writing a new perl sub that would accept this hash as arguement. On the other side, my hashref got transformed into a plain string holding the name of the variable holding the hashref...?
So, is there a way to use a hashref in a template outside of a loop?
If anybody knows...
Thank you!
Eric.
Got a small issue. I have a sub that returns a hashref to be used by a template to do lookups (validate states) without using too much DB ressources. My problem is that I don't know how to access this hash in the template tags (<%... %>).
I've tried the usual syntax : <% myhashref->{myitem} %> but this always returns 0, even for valid items.
Using the dump function of GT::Forum, I can see my Hash with all its values.
I've also tries writing a new perl sub that would accept this hash as arguement. On the other side, my hashref got transformed into a plain string holding the name of the variable holding the hashref...?
So, is there a way to use a hashref in a template outside of a loop?
If anybody knows...
Thank you!
Eric.