Mysterious Pilot Posted December 7, 2010 Report Share Posted December 7, 2010 I am experimenting with the creation of custom add-on modules, at the moment without DB access. So I have a module PHP file that goes in modules/MODULE_NAME and the template file in the templates directory. Now, on the module file I process all input parameters that may be given on the URL as well as predefined class variables. What if I want to access the value of one of those variables of the module file back in the template? For example if I defined "var $testMe = true" within the module class that extends Codeon, how would I go about accessing this variable value from my template (TPL) file? Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted December 7, 2010 Report Share Posted December 7, 2010 You would want to SET the variable in the template as such Template::Set('testMe', $testMe); In the template you can then use is as $testMe Quote Link to comment Share on other sites More sharing options...
Mysterious Pilot Posted December 7, 2010 Author Report Share Posted December 7, 2010 You would want to SET the variable in the template as such Template::Set('testMe', $testMe); In the template you can then use is as $testMe Thanks a lot! got it to work that way. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.