Variable from BeforeRender to AfterStore 1283 PostsBucklash 7 years ago2TopicHi folksShould it be possible to initiate a variable in beforeRender, and use it in AfterStore?i.e. in beforeRender: $dave = 'Hey, Dave';i.e. in AfterStore: do something with $dave... 4229 PostsKadministrator 7 years ago1Level 1You would need to push this value to the object that exist globaly, if not hign else you can use joomla application instance for that 1283 PostsBucklash 7 years ago0Level 2HiThis is the way:BEFORERENDER:$session = JFactory::getSession(); $session->set('food', 'cabbage');BEFORESTORE/AFTERSTORE$session = JFactory::getSession(); $eat = $session->get('food');