Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 如何将不同的引导类与joomla 3中的if countmodules一起使用_Twitter Bootstrap_Joomla - Fatal编程技术网

Twitter bootstrap 如何将不同的引导类与joomla 3中的if countmodules一起使用

Twitter bootstrap 如何将不同的引导类与joomla 3中的if countmodules一起使用,twitter-bootstrap,joomla,Twitter Bootstrap,Joomla,我对joomla和引导模板有一个问题 我为joomla从头构建的模板有问题。 想要建立这个模板的客户给了我一个来自Othert cms的演示,希望我为他建立这个模板,直到现在都没问题。演示在这里->如果你想看的话 我需要一些关于if countmodules语句的帮助,以便为我在主要部分(边栏-l和组件)中使用的div使用不同的引导类 我想使用3列类作为侧边栏左侧位置,如果侧边栏模块存在,则组件类为9;如果侧边栏左侧位置不存在,则组件类为12 有什么帮助吗 您的主题2列布局。我们需要看看你的in

我对joomla和引导模板有一个问题

我为joomla从头构建的模板有问题。 想要建立这个模板的客户给了我一个来自Othert cms的演示,希望我为他建立这个模板,直到现在都没问题。演示在这里->如果你想看的话

我需要一些关于if countmodules语句的帮助,以便为我在主要部分(边栏-l和组件)中使用的div使用不同的引导类

我想使用3列类作为侧边栏左侧位置,如果侧边栏模块存在,则组件类为9;如果侧边栏左侧位置不存在,则组件类为12

有什么帮助吗

  • 您的主题2列布局。我们需要看看你的index.php
  • 阅读Joomla protostar template 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>
    
    //调整内容宽度
    如果($this->countModules('position-7')&&($this->countModules('position-8'))
    {
    $span=“span6”;
    }
    
    Protostar主题正在使用bootstrap2,对吗?我用Bootstrap3构建了模板IW,所以我不用span*而是使用col--index.php在这里Protostar主题使用bootstrap2,对吗?是的,没错。但是你可以使用bootstrap3类开发自己的方法