T3 Community Discussion & Support

Let's build the best free Joomla template framework, together!
  1. Angelo
  2. General Discussion
  3. Friday, 26 September 2014
  4.  Subscribe via email
How or Where i have to enable content mass top and bottom in JA T3v3?

Regards
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Angelo,

Here are the steps to add content mass top position to a specific layout.

1. Open the layout file you want to add the content mass top position: templates\t3_bs3_blank\tpls, by default, you would see that the layout load mainbody block:
<?php $this->loadBlock('mainbody') ?>
, it could load other blocks like "mainbody-content-left" or "mainbody-content-right".

2. After define the mainbody block the layout loads, next, open the mainbody layout file (example mainbody.php block: templates): templates\t3_bs3_blank\tpls\blocks\mainbody.php, in the file, you would see:

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. Open the blocks file that the mainbody block loads (example: mainbody/two-sidebar), open the file: templates\t3_bs3_blank\tpls\blocks\mainbody\two-sidebar.php, add new position in the main content section.

<p>Here is the default code of main content section</p>

<!-- 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" />
</div>
<!-- //MAIN CONTENT -->


<p>Now add the content mass-top position to the main content section, here is the code:</p>

<?php if($this->countModules('content-mass-top')): ?>
<div class="t3-content-mass-top">
<jdoc:include type="modules" name="<?php $this->_p($vars['content-mass-top']) ?>" style="T3Xhtml" />
</div>
<?php endif; ?>


<p>Now, the new main content section code will be:</p>

<!-- MAIN CONTENT -->
<div id="t3-content" class="t3-content col-xs-12 col-md-6 col-md-push-3">

<?php if($this->countModules('content-mass-top')): ?>
<div class="t3-content-mass-top">
<jdoc:include type="modules" name="<?php $this->_p($vars['content-mass-top']) ?>" style="T3Xhtml" />
</div>
<?php endif; ?>

<?php if($this->hasMessage()) : ?>
<jdoc:include type="message" />
<?php endif ?>
<jdoc:include type="component" />
</div>
<!-- //MAIN CONTENT -->


Do the same for content mass bottom.

Hope it help you. If you have any trouble, please let me know.

P/S: thank you for your comment in the discussion: http://t3-framework.org/discussions/tutorial-for-what.html. We will check, update and improve the documentation.

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


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