Gossamer Forum
Home : Products : Gossamer Links : Discussions :

How can I add a variables like $User/user $CFG/config which are available everywhere

Quote Reply
How can I add a variables like $User/user $CFG/config which are available everywhere
Hi,

I am a little stuck. I have some variables within a Plugin like special paths. At the moment they are within the init subroutine hook and I add information to $CFG like:

Code:
$CFG->{date_to_text_long} = ...
$CFG->{products_db} = ...

So in any Perl code after having called init I can use the variables and within any template i can use them as well.

It should be easy to do this with $my_own_name_for_this but I donīt get it.
The problem with the above is that the variables are dynamic and can vary from visitor to visitor but they are stored in Config.pm every time they are used.
Though it works that way it seems not reasonable to do it like that.

Thanks for hints

Regards

n||i||k||o

Last edited by:

el noe: Jun 3, 2011, 4:54 AM
Subject Author Views Date
Thread How can I add a variables like $User/user $CFG/config which are available everywhere el noe 16023 Jun 3, 2011, 4:54 AM
Thread Re: [el noe] How can I add a variables like $User/user $CFG/config which are available everywhere
brewt 15776 Jun 8, 2011, 12:26 AM
Thread Re: [brewt] How can I add a variables like $User/user $CFG/config which are available everywhere
el noe 15714 Jun 8, 2011, 3:26 AM
Thread Re: [el noe] How can I add a variables like $User/user $CFG/config which are available everywhere
Andy 15722 Jun 8, 2011, 6:09 AM
Thread Re: [Andy] How can I add a variables like $User/user $CFG/config which are available everywhere
el noe 15726 Jun 8, 2011, 6:17 AM
Thread Re: [el noe] How can I add a variables like $User/user $CFG/config which are available everywhere
Andy 15714 Jun 8, 2011, 6:45 AM
Thread Re: [Andy] How can I add a variables like $User/user $CFG/config which are available everywhere
el noe 15730 Jun 8, 2011, 7:01 AM
Thread Re: [el noe] How can I add a variables like $User/user $CFG/config which are available everywhere
Andy 15720 Jun 8, 2011, 7:08 AM
Thread Re: [Andy] How can I add a variables like $User/user $CFG/config which are available everywhere
el noe 15743 Jun 8, 2011, 7:28 AM
Thread Re: [el noe] How can I add a variables like $User/user $CFG/config which are available everywhere
el noe 15700 Jun 8, 2011, 7:48 AM
Thread Re: [el noe] How can I add a variables like $User/user $CFG/config which are available everywhere
brewt 15720 Jun 8, 2011, 4:12 PM
Post Re: [brewt] How can I add a variables like $User/user $CFG/config which are available everywhere
el noe 15662 Jun 9, 2011, 1:31 AM
Thread Re: [brewt] How can I add a variables like $User/user $CFG/config which are available everywhere
el noe 14400 Jan 23, 2014, 6:01 AM
Thread Re: [el noe] How can I add a variables like $User/user $CFG/config which are available everywhere
brewt 13405 Jan 30, 2014, 3:37 PM
Post Re: [brewt] How can I add a variables like $User/user $CFG/config which are available everywhere
el noe 13400 Jan 30, 2014, 10:21 PM