我想做的是将一些 HTML 标签添加到我的 Joomla!模块标题。我需要这样的东西
Some <b>Title</b>
但是当我保存时!Joomla 会修剪标题并删除所有 HTML 标签。
我检查了administrator/com_content,我认为它应该负责插入数据库数据,但我在那里找不到答案。
谁能帮我解决这个头痛问题吗?
查看../templates/system/html/modules.php
您可以在 HTML 中设置模块结构的样式。
function modChrome_myCustomModule($module, &$params, &$attribs)
{
$doc =& JFactory::getDocument();
$css = ".otherClass {}";
$css .= ".yourClass {}";
$doc->addStyleDeclaration($css);
?>
<div>
<?php if ($module->showtitle != 0) : ?>
<h1><?php echo $module->title; ?></h1>
<?php endif; ?> // post your title
</div>
<div>
<?php echo $module->content; ?> // post your module content
</div>
<?php
}
然后在index.php中调用你的样式模块:
<jdoc:include type="modules" name="right" style="myCustomModule" />
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)