Joomla access state variable in modules
How can I access my state variables in Joomla modules?
I usually do it like
$app = JFactory::getApplication();
$variable = $app->getUserState('com_mycomponent.view.filter.variable' ,'default');
But in the module, the result will be empty, or in this case it will be the default.
The module has a selection field. I need to save the selection input to display the selected value again after the page is submitted. Without this, the select box will be reset after the page is submitted.
+3
source to share
No one has answered this question yet
Check out similar questions: