Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • ronron6 Friend
    #990039

    hi

    can you assist me on having a new sidebar?

    so what i want is to have sidebar1 – content – sidebar3 – sidebar2

    i already made changes to

    …/templates/purity_iii/tpls/blocks/mainbody.php

    <?php
    /**
     * @package   T3 Blank
     * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
     * @license   GNU General Public License version 2 or later; see LICENSE.txt
     */
    
    defined('_JEXEC') or die;
    ?>
    
    <?php
    
    /**
     * Mainbody 3 columns, content in center: sidebar1 - content - sidebar2
     */
    
    // positions configuration
    $sidebar1 = 'sidebar-1';
    $sidebar2 = 'sidebar-2';
    $sidebar3 = 'sidebar-3';
    
    $sidebar1 = $this->countModules($sidebar1) ? $sidebar1 : false;
    $sidebar2 = $this->countModules($sidebar2) ? $sidebar2 : false;
    $sidebar2 = $this->countModules($sidebar3) ? $sidebar3 : false;
    
    // detect layout
    if ($sidebar1 && $sidebar2 && $sidebar3) {
            $this->loadBlock('mainbody/three-sidebar', array('sidebar1' => $sidebar1, 'sidebar2' => $sidebar2, 'sidebar3' => $sidebar3));  } elseif ($sidebar1 && $sidebar2) {
        $this->loadBlock('mainbody/two-sidebar', array('sidebar1' => $sidebar1, 'sidebar2' => $sidebar2));
    } elseif ($sidebar1) {
        $this->loadBlock('mainbody/one-sidebar-left', array('sidebar' => $sidebar1));
    } elseif ($sidebar2) {
        $this->loadBlock('mainbody/one-sidebar-right', array('sidebar' => $sidebar2));
    } else {
        $this->loadBlock('mainbody/no-sidebar');
    }
    

    i also created a new file three-sidebar.php and added it to the mainbdody

    …templates/purity_iii/tpls/blocks/mainbody/three-sidebar.php

    <?php
    /**
     * @package   T3 Blank
     * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
     * @license   GNU General Public License version 2 or later; see LICENSE.txt
     */
    
    defined('_JEXEC') or die;
    
    /**
     * Mainbody 3 columns, content in center: sidebar1 - content - sidebar2
     */
    ?>
    
    <div id="t3-mainbody" class="container t3-mainbody">
        <div class="row">
    
            <!-- MAIN CONTENT -->
            <div id="t3-content" class="t3-content col-xs-12 col-md-5  col-md-push-2">
                <?php if($this->hasMessage()) : ?>
                <jdoc:include type="message" />
                <?php endif ?>
    
                          <jdoc:include type="modules" name="adposi" Style="T3Xhtml" /> 
                <jdoc:include type="component" />
            </div>
            <!-- //MAIN CONTENT -->
    
            <!-- SIDEBAR 1 -->
            <div class="t3-sidebar t3-sidebar-1 col-xs-6  col-md-2  col-md-pull-5 <?php $this->_c($vars['sidebar1']) ?>">
                <jdoc:include type="modules" name="<?php $this->_p($vars['sidebar1']) ?>" style="T3Xhtml" />
            </div>
            <!-- //SIDEBAR 1 -->
    
            <!-- SIDEBAR 2 -->
            <div class="t3-sidebar t3-sidebar-2 col-xs-6  col-md-3 <?php $this->_c($vars['sidebar2']) ?>">
                <jdoc:include type="modules" name="<?php $this->_p($vars['sidebar2']) ?>" style="T3Xhtml" />
            </div>
            <!-- //SIDEBAR 2 -->
    
                    <!-- SIDEBAR 3 -->
            <div class="t3-sidebar t3-sidebar-3 col-xs-6  col-md-3 col-md-pull-2 <?php $this->_c($vars['sidebar3']) ?>">
                <jdoc:include type="modules" name="<?php $this->_p($vars['sidebar3']) ?>" style="T3Xhtml" />
            </div>
            <!-- //SIDEBAR 3 -->
    
        </div>
    </div> 

    unfortunately i cant get it to work. am i messing something?

    thanks

    Saguaros Moderator
    #990469

    Hi,

    I guess it comes from the three-sidebar.php file, pls make sure that the total grid is always equal to 12 for col-xs, col-md, etc…

    For more info: http://getbootstrap.com/css/#grid

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 1 reply, has 2 voices, and was last updated by  Saguaros 7 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum