【发布时间】:2017-02-23 05:40:19
【问题描述】:
遇到一个有趣的问题。
Joomla 3.6.2 以某种方式改变了模板的 index.php 文件,创建了显示页面的奇怪结果。
index.php 的原始代码是这样的:
<div id="content">
<div id="main_content">
<div id="breakingnews">
<jdoc:include type="modules" name="breakingnews" style="xhtml" />
</div>
<div id="news_module">
<jdoc:include type="modules" name="news_module" style="xhtml" />
</div>
<div id="component_wrapper">
<jdoc:include type="message" />
<jdoc:include type="component" />
</div>
<div id="content_module">
<jdoc:include type="modules" name="content_module" style="xhtml" />
</div>
</div>
<div id="right">
<div id="inner_right">
<jdoc:include type="modules" name="right" style="xhtml" />
</div>
</div>
<div id="breadcrumbs">
<jdoc:include type="modules" name="breadcrumbs" style="xhtml" />
</div>
<div id="clearfix"></div>
</div>
Joomla 创建以下代码: DIV #right is within #main_content DIV but it is not supposed to be
同样的事情也发生在网站的其他部分,例如,在博客布局中的项目中;它将 .item 和 .span 元素放在一起,如下所示: By that it makes the whole website layout go crazy!
有什么想法吗,伙计们?
谢谢!
【问题讨论】:
-
看起来
component_wrapper中的任何内容都在添加一个额外的</div>,因为content_modulediv 也在其中。你检查过你的组件的代码吗?但无论如何,这是因为一个结束标签。所以 Joomla 没有对你的代码做任何事情,但是一个组件可能编码错误。