test
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • sky Friend
    #973646

    How to add a new module position beside sidebar? http://screencast.com/t/xENDUK8UXo82

    I tried to put the below code in two-sidebar.php, but not working:

    <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-6  col-md-push-3">
                <?php if($this->hasMessage()) : ?>
                <jdoc:include type="message" />
                <?php endif ?>
                <jdoc:include type="component" />
    
    <?php if($this->countModules('new-position')) : ?>
    <jdoc:include type="modules" name="new-position" style="raw" ></jdoc:include>
    <?php endif ?>
            </div>
            <!-- //MAIN CONTENT -->
    
            <!-- SIDEBAR 1 -->
            <div class="t3-sidebar t3-sidebar-1 col-xs-6  col-md-3  col-md-pull-6 <?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 -->
    
        </div>
    </div> 
    Ninja Lead Moderator
    #973653

    Hi,

    You can follow the guide below

    • Define new position from this file templates/ja_megastore/tpls/blocks/mainbody.php file

    • Add the script below to files
    <jdoc:include type="modules" name="<?php $this->_p($vars['new-position']) ?>" style="T3Xhtml" />
    templates/ja_megastore/tpls/blocks/mainbody/one-sidebar-right.php
    templates/ja_megastore/tpls/blocks/mainbody/one-sidebar-left.php
    templates/ja_megastore/tpls/blocks/mainbody/no-sidebar.php
    templates/ja_megastore/tpls/blocks/mainbody/two-sidebar.php

    Hope it helps

    Regards

    sky Friend
    #973685
    This reply has been marked as private.
    Ninja Lead Moderator
    #973980

    Hi
    Have a look at the code detail below

    • Define new position from this file templates/ja_megastore/tpls/blocks/mainbody.php file, see the mainbody.png
    // detect layout
    if ($sidebar1 && $sidebar2) {
        $this->loadBlock('mainbody/two-sidebar', array('sidebar1' => $sidebar1, 'sidebar2' => $sidebar2, 'new-position'=>'new-position'));
    } elseif ($sidebar1) {
        $this->loadBlock('mainbody/one-sidebar-left', array('sidebar' => $sidebar1, 'new-position'=>'new-position'));
    } elseif ($sidebar2) {
        $this->loadBlock('mainbody/one-sidebar-right', array('sidebar' => $sidebar2, 'new-position'=>'new-position'));
    } else {
        $this->loadBlock('mainbody/no-sidebar', array('new-position'=>'new-position'));
    }
    • Add this code
    <jdoc:include type="modules" name="<?php $this->_p($vars['new-position']) ?>" style="T3Xhtml" />

    into files

    templates/ja_megastore/tpls/blocks/mainbody/one-sidebar-right.php
    templates/ja_megastore/tpls/blocks/mainbody/one-sidebar-left.php
    templates/ja_megastore/tpls/blocks/mainbody/no-sidebar.php
    templates/ja_megastore/tpls/blocks/mainbody/two-sidebar.php

    see the screenshot add-position.png


    1. mainbody
    2. add-position
Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 3 replies, has 2 voices, and was last updated by  Ninja Lead 8 years, 1 month ago.

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