Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
October 5, 2016 at 3:46 am #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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
October 5, 2016 at 4:41 am #973653Hi,
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
October 5, 2016 at 7:58 am #973685This reply has been marked as private.Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
October 6, 2016 at 4:23 am #973980Hi
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
-
AuthorPosts
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
Jump to forum