1
vrambo
how to set global smarty variable for a whole module
  • 2005/8/25 14:06

  • vrambo

  • Just popping in

  • Posts: 3

  • Since: 2005/8/22


Hi,
I currently set a smarty variable like this:

$GLOBALS['xoopsTpl']->assign('variable_name', 'value i want to assign it');


By setting this in page A.php I can access it in the theme.html file while loading page A.php. However when I surf to B.php, via A.php, the variable is lost in theme.html. How can I make this global variable persistent for the whole module?

I basically want to call it in theme.html the whole time, by setting it's value only once, on a particular php page.

Thanks a million,
Vram

2
shank
Re: how to set global smarty variable for a whole module
  • 2005/8/26 2:12

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


Can you say what you are trying to assign to what varible?
s l s h a n k l e @ b e l l s o u t h . n e t

3
LazyBadger
Re: how to set global smarty variable for a whole module

Quote:

vrambo wrote:

I basically want to call it in theme.html the whole time, by setting it's value only once, on a particular php page.

header.php is right place for you
Quis custodiet ipsos custodes?

Webmaster of
XOOPS2.RU
XOOPS Modules Proving Ground
XOOPS Themes Exhibition