[Templates] Access a macro in all templates?

2009-10-12 Thread Octavian Râşniţă
Hi, Is it possible to define a macro in a single place and access it in all the templates? For example, I want to create a macro for translation, which would be needed in all the templates and it would be nice if it wouldn't be necessary to define it in every template. Thank you. Octavian

Re: [Templates] Access a macro in all templates?

2009-10-12 Thread Sean McAfee
2009/10/12 Octavian Râşniţă orasn...@gmail.com Hi, Is it possible to define a macro in a single place and access it in all the templates? For example, I want to create a macro for translation, which would be needed in all the templates and it would be nice if it wouldn't be necessary to

Re: [Templates] Access a macro in all templates?

2009-10-12 Thread Octavian Râşniţă
From: Sean McAfee eef...@gmail.com 2009/10/12 Octavian Râşniţă orasn...@gmail.com Hi, Is it possible to define a macro in a single place and access it in all the templates? For example, I want to create a macro for translation, which would be needed in all the templates and it would be

Re: [Templates] Access a macro in all templates?

2009-10-12 Thread Larry Leszczynski
Hi Octavian - Is it possible to define a macro in a single place and access it in all the templates? [cut] Now I just need to find how I can include this in Catalyst... You should be able to put variables, MACROs and BLOCK definitions in a file like my_config_stuff.tt, and then do

Re: [Templates] Access a macro in all templates?

2009-10-12 Thread C. Chad Wallace
At 11:33 AM on 12 Oct 2009, Sean McAfee wrote: 2009/10/12 Octavian Râşniţă orasn...@gmail.com Is it possible to define a macro in a single place and access it in all the templates? This seems to work: use Template; use Template::Context; my $context = Template::Context-new;

Re: [Templates] Access a macro in all templates?

2009-10-12 Thread Oleg Kostyuk
2009/10/12 Octavian Râşniţă orasn...@gmail.com: Thank you very much! Now I just need to find how I can include this in Catalyst... Take a look at Catalyst::Helper::View::TTSite -- Sincerely yours, Oleg Kostyuk (CUB-UANIC) ___ templates mailing list

Re: [Templates] Access a macro in all templates?

2009-10-12 Thread Octavian Râsnita
From: Larry Leszczynski lar...@emailplus.org Hi Octavian - Is it possible to define a macro in a single place and access it in all the templates? [cut] Now I just need to find how I can include this in Catalyst... You should be able to put variables, MACROs and BLOCK definitions in