Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Pass two or more values with a template global ?

Quote Reply
Pass two or more values with a template global ?
I want to pass tow or more values with a global.
I tried it with something like:

Code:
sub test ...
%lala=(first => '1', second => '2');
return %lala
Then in template i tried ti use
Code:
<%test.first%> and <%test.second%>; but it fails ...
Has someone a clue how to do that?
Quote Reply
Re: [Robert] Pass two or more values with a template global ? In reply to
Hi,

Not sure sure what you're trying to do. Are you trying to pass back values via a global? If so, then you need something like;

Code:
sub {

# do stuff here

return { tag_name => "foo", another_tag => "test" };

}

..then call with;

<%global_name%>

..and anywhere after that, you could use;

<%tag_name%>

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!
Quote Reply
Re: [Andy] Pass two or more values with a template global ? In reply to
Thank you.