无法在joomla用户事件插件中获取前端模板参数

时间:2014-03-11 10:16:07

标签: templates plugins joomla params

无法在onUserBeforeSave事件插件中获取徽标的模板参数...

public function onUserBeforeSave($user, $isnew, $success, $msg){

  $app        = JFactory::getApplication();
  $template   = $app->getTemplate(true);
  $params     = $template->params;
  $variable   = $params->get('logo');
}

1 个答案:

答案 0 :(得分:0)

我不确定您是否在使用当前代码时遇到任何错误,但我确信以下内容将会正常运行,因为我刚刚对其进行了测试:

$params = JFactory::getApplication()->getTemplate(true)->params;
$variable = $params->get('logo');

echo $variable;