我有一个关于joomla和引导程序模板的问题。
我从零开始为joomla构建的模板有问题。想要构建这个模板的客户给了我一个来自othet cms的演示,并希望我为他构建模板,到目前为止还可以。演示在这里->http://www.templatemonster.com/demo/49165.html如果你想看的话。
我需要一些关于if countmodules语句的帮助,以便为我在主要部分(sidebar-l和component)中使用的div使用不同的引导类。
如果侧边栏模块存在,我想使用3列类作为侧边栏的左侧位置,如果侧边栏左侧位置不存在,则使用组件到9类,否则使用组件到12类。
有什么帮助吗?
- 您的主题2列布局。我们需要查看您的index.php
- 阅读Joomla protostar模板index.php
你会得到解决方案的。
// Adjusting content width
if ($this->countModules('position-7') && $this->countModules('position-8'))
{
$span = "span6";
}
<main id="content" role="main" class="<?php echo $span;?>">
<!-- Begin Content -->
<jdoc:include type="modules" name="position-3" style="xhtml" />
<jdoc:include type="message" />
<jdoc:include type="component" />
<jdoc:include type="modules" name="position-2" style="none" />
<!-- End Content -->
</main>