So..I have created a module called "moon". In the module, i use moon_menu to assign a menu that calls back moon_page to display something to the browser.
function moon_page(){
$moonsvariable = 'hi this is a function';
return theme('moon_display',$moonsvariable);
}
is it possible to assign a custom variable to the template then use it in the template?
I would like to it in the following way.
function moon_page(){
$custom_variable = "this is a custom variable";
$moonsvariable = 'hi this is a function';
return theme('moon_display',$moonsvariable);
}
Then I like to use <? print $custom_variable ?>
in my theme to display it.
I tried variable_set
, but it does not work.