I created this block for use in a commercial guide I'm doing and I'll share with you . As the search for answers , always enter the field content before of sidebar 1 and 2 in mobile and tablet devices , I created this custom mainbody block so I can put the categories in sidebar 1 and search filter in sidebar 2 . And when access is made of phones and tablets , these fields (sidebar 1 and 2 ) appear at the top of the mainbody , before content field (which returns the search results ) . Go templates \ t3_bs3_blank \ tpls \ blocks \ mainbody folder , and create a new file in this location . Name "two- sidebar- p " .
Now copy this code into " two - sidebar- p "
<?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">
<!-- SIDEBAR 1 -->
<div class="t3-sidebar t3-sidebar-1 col-xs-12 col-sm-6 col-md-3 col-md-3 col-md-3<?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-12 col-sm-6 col-md-3 col-md3 col-md-push-6 <?php $this->_c($vars['sidebar2']) ?>">
<jdoc:include type="modules" name="<?php $this->_p($vars['sidebar2']) ?>" style="T3Xhtml" />
</div>
<!-- //SIDEBAR 2 --
<!-- MAIN CONTENT -->
<div id="t3-content" class="t3-content col-xs-12 col-md-6 col-md-pull-3">
<?php if($this->hasMessage()) : ?>
<jdoc:include type="message" />
<?php endif ?>
<jdoc:include type="component" />
</div>
<!-- //MAIN CONTENT -->
</div>
</div>
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Access now
templates \ t3_bs3_blank \ tpls \ blocks \ and create a copy of mainbody file by the name " mainbody - p " and replace the line
$ this - > loadBlock ( ' mainbody / two - sidebar ', array ( ' sidebar1 ' = > $ sidebar1 , ' sidebar2 ' = > $ sidebar2 ) ) ;
by
$ this - > loadBlock ( ' mainbody / two - sidebar- p ', array ( ' sidebar1 ' = > $ sidebar1 , ' sidebar2 ' = > $ sidebar2 ) ) ;
To finish create a copy of the default theme and give the " default- p " name or the name you want . Open this theme ( default- p or the name you gave ) and in line
< ? php $ this - > loadBlock ( ' mainbody ' ) >
exchange for
< ? php $ this - > loadBlock ( ' mainbody - p' ) >
Personalize and be happy .
Make a test.