Hi,
After OMP upgrading to 3.1.1.3, found a strange behavior of custom developed theme: in previous used OMP version, 3.1.0.0, variables declared in theme functions was passed to frontend and backend custom templates, but in upgraded 3.1.1.3 - to the frontend only.
code:
/**
* Initialize the theme’s styles, scripts and hooks. This is run on the
* currently active theme and it’s parent themes.
*
* @return null
*/
public function init() {
HookRegistry::register (‘TemplateManager::display’, array($this, ‘loadTemplateData’));
$this->setParent(‘defaultthemeplugin’);
$this->addScript(‘defoverfrontend’, ‘js/frontend.js’, array(‘contexts’ => ‘frontend’));
$this->addScript(‘defoverbackend’, ‘js/backend.js’, array(‘contexts’ => ‘backend’));
$this->addStyle(‘defoverfrontend’, ‘styles/defover.css’, array(‘contexts’ => ‘frontend’));
}
public function loadTemplateData($hookName, $args) {
// Retrieve the TemplateManager
$templateMgr = $args[0];
$departments = $this->getDepartmentsOptionsList();
$templateMgr->assign('departments', $departments);
}
And, like I said earlier, variable $departments is passed only to the frontend template - plugins/themes/defover/templates/frontend/components/registrationForm.tpl, but not to the plugins/themes/defover/templates/common/userDetails.tpl and plugins/themes/defover/templates/user/contactForm.tpl
Maybe there is some changes (bugs?) of theming in 3.1.1.3 release?
regards,
Vitas.