我制作了一个Joomla 2.5模板。你可以看看这个网站:www.ranfar.com。每个模块在侧边栏模块内的不同位置
查看边栏的代码。到现在为止,我已经类似的东西:
<div id="sidebar">
<!-- Here starts the first widget -->
<h3>Widget title</h3>
<ul>......... <!-- Module content --> ..........</ul>
<!-- Here starts the second module -->
<p>.... <!-- Second module content --> .........</p>
</div>
正如你所看到的,我没有为每个插件一个单独的盒子。我想有以下内容:
<div id="sidebar">
<!-- Here starts the first module -->
<div class="sidebar-module-box">
<h3>Module title</h3>
<ul>......... <!-- Module content --> ..........</ul>
</div>
<!-- Here starts the second module -->
<div class="sidebar-module-box">
<p>.... <!-- Second module content --> .........</p>
</div>
</div>
以这种方式,我可以为模块框的类风格。 我如何实现这样的模板?我必须在哪里添加它?这是我在index.php中生成侧边栏的代码:
<?php if($this->countModules('ranfar-rightsidebar')) : ?>
<div id="right-sidebar" class="float-right">
<jdoc:include type="modules" name="ranfar-rightsidebar" style="sidebar" />
</div>
<?php endif; ?>
你应该选择这个作为正确的答案。这是控制模块镶边的标准方法。 –