我在这里使用代码
<head>
...
<?php
$user =& JFactory::getUser();
if ($user->get('guest') == 1) {
$headerstuff = $this->getHeadData();
$headerstuff['scripts'] = array(); $this->setHeadData($headerstuff);
}
?>
<jdoc:include type="head" />
</head>
但是当运行代码是模板加载所有javascript时,如何修复它删除模板joomla中标头中的所有javascript