Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Accessing template tags in globals

Quote Reply
Accessing template tags in globals
Hi,

I want to be able to access template tags like 'page_id', inside my user created globals - what is the proper syntax for that?

I've tried:

<%page_id%>
$page_id
page_id

.. I always get a literal string instead of the value of the variable.

Thanks,
Stef
Quote Reply
Re: [kajukenbokid] Accessing template tags in globals In reply to
Use:
Code:
my $vars = GT::Template->vars;
my $page_id = $vars->{page_id};

Adrian