T3 Community Discussion & Support

Let's build the best free Joomla template framework, together!
  1. AbeAlpha
  2. General Discussion
  3. Tuesday, 15 July 2014
  4.  Subscribe via email
I wana have 2 offcanvas sidebars in the same web. one on right and other on left.
I try to copy the block of offcanvas, but i dont find where to assing this block. In default.php do not exsist the block of-canvas.

Where to add the block off-canvas2?
Comment
There are no comments made yet.
Accepted Answer
Accepted Answer Pending Moderation
2
Votes
Undo
Hi AbeAlpha,

To create a new off-canvas sidebar on the right side (the default off-canvas sidebar is on the left side), please follow the instructions:

1. Duplicate the "templates/t3_bs3_blank/tpls/blocks/off-canvas.php", rename it to "off-canvas-custom.php". Open the file, change the position that the off-canvas gets content from and the id. Here is the sample code of the off-canvas-custom.php, you can use this code.

<?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;
?>
<?php
if (!$this->getParam('addon_offcanvas_enable')) return ;
?>

<button class="btn btn-primary off-canvas-toggle <?php $this->_c('position-1') ?>" type="button" data-pos="right" data-nav="#t3-off-canvas-custom" data-effect="<?php echo $this->getParam('addon_offcanvas_effect', 'off-canvas-effect-3') ?>">
<i class="fa fa-home"></i>
</button>

<!-- OFF-CANVAS SIDEBAR -->
<div id="t3-off-canvas-custom" class="t3-off-canvas <?php $this->_c('position-1') ?>">

<div class="t3-off-canvas-header">
<h2 class="t3-off-canvas-header-title">Custom Sidebar</h2>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>

<div class="t3-off-canvas-body">
<jdoc:include type="modules" name="<?php $this->_p('position-1') ?>" style="T3Xhtml" />
</div>

</div>
<!-- //OFF-CANVAS SIDEBAR -->


The new off-canvas gets content from "position-1", located in right side "data-pos="right"" and id "#t3-off-canvas-custom".

2. Load the new off-canvas sidebar to the block you want. Add the code below to the file, I will load it in the "mainnav.ph".

<?php 
if ($this->countModules('position-1') && $this->getParam('addon_offcanvas_enable') ) :
$this->loadBlock ('off-canvas-custom');
endif;
?>


3. Customize the off-canvas sidebar icon if you want. Use LESS or CSS to do this.

Here is the front-page for the sample: http://easycaptures.com/fs/uploaded/796/8914777850.png


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
Amazing, thanks a lot, works perfect!

...working in this more than 2 days ;)




I have a doubt,
Its posible to have the oncanvas in top to botton, and from botton to top?
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
Great to see it help 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
Hi Gardner,

Please explain more about LESS or CSS that you customize the off-canvas sidebar icon. ;) ;)
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 3
Accepted Answer Pending Moderation
0
Votes
Undo
Please refer to the documentation for more detail of how to customize the sidebar icon: https://www.joomlart.com/documentation/purity-iii/faqs#sidebar-icon

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


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