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. pedram
  2. General Discussion
  3. Wednesday, 16 April 2014
  4.  Subscribe via email
slide bar position layout default size=3 . do i have resize to 2?
Comment
There are no comments made yet.
Accepted Answer
Accepted Answer Pending Moderation
1
Votes
Undo
Yeah, of course Pedram.

For T3 blank template, it's a little bit different. Please follow the instruction below.

I will resize sidebar position in default layout.

1. Open the default layout file (templates/t3_blank/tpls/default.php)

<?php $this->loadBlock ('mainbody') ?>


We know that the sidebar position is loaded in the mainbody block.

2. Open mainbody.php file (templates/t3_blank/tpls/blocks)

// Layout configuration
$layout_config = json_decode ('{
"two_sidebars": {
"default" : [ "span6 offset3" , "span3 offset-9" , "span3" ],
"wide" : [],
"xtablet" : [],
"tablet" : [ "span12" , "span6 spanfirst" , "span6" ]
},
"one_sidebar1": {
"default" : [ "span9 pull-right" , "span3" ],
"wide" : [],
"xtablet" : [ "span8 pull-right" , "span4" ],
"tablet" : [ "span12" , "span12 spanfirst" ]
},
"one_sidebar2": {
"default" : [ "span9" , "span3" ],
"wide" : [],
"xtablet" : [ "span8" , "span4" ],
"tablet" : [ "span12" , "span12 spanfirst" ]
},
"no_sidebar": {
"default" : [ "span12" ]
}
}');


That code detect position size of mainbody block. Now to change the size of sidebar position, just change and save the file.

Example: change the size of sidebar 1 and 2 from span 3 to span 2:

/// Layout configuration
$layout_config = json_decode ('{
"two_sidebars": {
"default" : [ "span8 offset2" , "span2 offset-10" , "span2" ],
"wide" : [],
"xtablet" : [],
"tablet" : [ "span12" , "span6 spanfirst" , "span6" ]
},
"one_sidebar1": {
"default" : [ "span10 pull-right" , "span2" ],
"wide" : [],
"xtablet" : [ "span8 pull-right" , "span4" ],
"tablet" : [ "span12" , "span12 spanfirst" ]
},
"one_sidebar2": {
"default" : [ "span10" , "span2" ],
"wide" : [],
"xtablet" : [ "span8" , "span4" ],
"tablet" : [ "span12" , "span12 spanfirst" ]
},
"no_sidebar": {
"default" : [ "span12" ]
}
}');


Gardner.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # Permalink
Accepted Answer Pending Moderation
0
Votes
Undo
Yeah, if you have any suggestion, please let me know, I'm willing to check and add to the documentation system.
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
hi luna . thanks you:;)
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
We're added to documentation, check it out at: http://t3-framework.org/documentation/bs3-layout-system#position-size

Thanks for your question again.

Gardner.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 3
Accepted Answer Pending Moderation
1
Votes
Undo
Anytime @Siwar
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 4
Accepted Answer Pending Moderation
0
Votes
Undo
Thank you for this post @Luna :)
REGARDS

Siwar
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 5
Accepted Answer Pending Moderation
0
Votes
Undo
hi luna . thanks for reply . i am using the t3 blank template . can you help me .?
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 6
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Pedram,

You can re-size the sidebar position. For example, I will change the sidebar size of default layout. The steps I have to follow:

1. Open file default.php in templates\t3_bs3_blank\tpls to see which mainbody block the layout loads.

<?php $this->loadBlock('mainbody') ?>


2. As the default layout load "mainbody" block so open the mainbody.php file in templates\t3_bs3_blank\tpls\blocks

// detect layout
if ($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');
}


3. Now you have to define which layout for the mainbody block. Example, the mainbody block has 2 sidebars so open the two-sidebar.php file in templates\t3_bs3_blank\tpls\blocks\mainbody

<!-- 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" ></jdoc:include>
<?php endif ?>
<jdoc:include type="component" ></jdoc:include>
</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 -->


Now customize the size of main content, sidebar 1 and sidebar 2. By default, the default size is: main content block is span 6, sidebar 1 and sidebar 2 is span 3.

Example: change the size of main content to span 8, sidebar 1 and sidebar 2 is span 2:

<!-- MAIN CONTENT -->
<div id="t3-content" class="t3-content col-xs-12 col-md-8 col-md-push-2">
<?php if($this->hasMessage()) : ?>
<jdoc:include type="message" />
<?php endif ?>
<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-8 <?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-2 <?php $this->_c($vars['sidebar2']) ?>">
<jdoc:include type="modules" name="<?php $this->_p($vars['sidebar2']) ?>" style="T3Xhtml" />
</div>
<!-- //SIDEBAR 2 -->



P/S: thanks for your question, were gonna to make a video tutorial or detail documentation for the topic.

Gardner.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 7
  • Page :
  • 1


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