We moved to new unified forum!

Please post all new support queries in our New Forum.

T3 Community Discussion & Support

Let's build the best free Joomla template framework, together!
  1. Igor Cunha
  2. Vanity Monster Sherlock Holmes The Voice
  3. General Discussion
  4. Wednesday, 05 February 2014
  5.  Subscribe via email
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.
  Resende - Rio de Janeiro, Brazil
Visit 
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
0
Votes
Undo
Sorry about that, been corrected, it is because I use google translator, and sometimes commit these mistakes. please when you see any errors in my posts, just leave a message, I will make the change. Thank you for reporting.
  Resende - Rio de Janeiro, Brazil
Visit 
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
Thanks for the hint, can be very good use. Unfortunately, I have no programming talent, but it may be that a small error has crept in?

$ this - > loadBlock ( ' mainbody / sidebar - two ', array ( ' sidebar1 ' = > $ sidebar1 , ' sidebar2 ' = > $ sidebar2 ) ) ;

by

$ this - > loadBlock ( ' mainbody / sidebar- two- p ', array ( ' sidebar1 ' = > $ sidebar1 , ' sidebar2 ' = > $ sidebar2 ) ) ;


$ this-> load block ('mainbody / two-sidebar-p', array ('sidebar1' => $ sidebar1, 'sidebar2' => $ sidebar2));

You twist the words two-sidebar with sidebar-two.
Nevertheless ... Thank you !!!
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 2
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.