php – 如何在Joomla中插入HTML标记!模块标题?

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了php – 如何在Joomla中插入HTML标记!模块标题?脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
要做的是为我的JooMLa添加一些 HTML标签!模块标题.我需要这样的东西

Some <b>TITle</b>

但是当我保存!Joomla修剪标题删除所有HTML标签.@H_512_10@

我检查了管理员/ com_content,我认为应该负责插入数据库数据,但我找不到答案.

任何人都可以帮我解决这个问题吗?

解决方法

查看../templates/system/html/modules.PHP

您可以在HTML中设置模块结构的样式.

function modChrome_myCustomModule($module,&amp;$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"  />

脚本宝典总结

以上是脚本宝典为你收集整理的php – 如何在Joomla中插入HTML标记!模块标题?全部内容,希望文章能够帮你解决php – 如何在Joomla中插入HTML标记!模块标题?所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。