【问题标题】:Joomla module classes duplicating/nestingJoomla 模块类复制/嵌套
【发布时间】:2013-09-10 12:34:17
【问题描述】:

我在 Joomla 模板中的模块位置只是一个带有“行”类的 div。当我使用自定义 html 模块将内容添加到该模块位置并为其提供模块类后缀“first”、“mod-light”和“bord-left”时,它似乎在我的模块位置中嵌套了 2 个 div,它们都具有相同的类这导致了问题。如何修改它以使其不创建此嵌套结构或至少不将这些类应用于内部 div?

例如,如果我只是将这个原始 html 输入到编辑器中......

"<p>...entered content appears here...</p>"

我会从 Joomla 得到这个输出...

<div class="moduletable first mod-light bord-left span4">
    <div class="custom first mod-light bord-left">
    <p>...entered content appears here...</p>
    </div>
</div>

我怎样才能让 Joomla 做到这一点...

<div class="moduletable first mod-light bord-left span4">

    <p>...entered content appears here...</p>

</div>

【问题讨论】:

    标签: html joomla content-management-system joomla3.0


    【解决方案1】:

    您可以使用自定义模块 chrome 创建自己的模块布局:

    http://docs.joomla.org/Applying_custom_module_chrome

    【讨论】:

    • 谢谢,这对我有所帮助,但是,我在编辑器中输入的内容似乎在模块中输出为“echo $module->content;”并且后缀、引导大小选择和模块样式选择应用于它所包含的 div。但是,模块标题不包含在该“内容”变量中,因此在 div 之外输出但是我编辑 modules.php .这意味着如果没有继承相同的类,我就不能为两者提供一个包装器 - 当我应用可见边框时出现问题,因为标题和框都有边框
    • 已修复:我需要为 mod_custom 进行布局覆盖,这涉及删除所有无关的 piffle-paffle 并简单地回显内容... content;?> 谢谢你的帮助 - 它确实让我找到了解决方案
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-09-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多