Templates 无法在joomla用户事件插件中获取前端模板参数
无法在OnUserPreSave事件插件中获取徽标的模板参数Templates 无法在joomla用户事件插件中获取前端模板参数,templates,plugins,joomla,params,Templates,Plugins,Joomla,Params,无法在OnUserPreSave事件插件中获取徽标的模板参数 public function onUserBeforeSave($user, $isnew, $success, $msg){ $app = JFactory::getApplication(); $template = $app->getTemplate(true); $params = $template->params; $variable = $params->
public function onUserBeforeSave($user, $isnew, $success, $msg){
$app = JFactory::getApplication();
$template = $app->getTemplate(true);
$params = $template->params;
$variable = $params->get('logo');
}
我不确定您当前的代码是否有任何错误,但是我确信以下内容可以正常工作,因为我刚刚对其进行了测试:
$params = JFactory::getApplication()->getTemplate(true)->params;
$variable = $params->get('logo');
echo $variable;
我可以在组件上使用此代码获得徽标。。但它不工作在用户事件插件只