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. Guest
  2. Motivator Hole-in-One Smile Seeker
  3. General Discussion
  4. Saturday, 03 October 2015
  5.  Subscribe via email
Hello,

I'm using the t3-blank template.
New here.
I have read the documentation and saw the video about adding blocks, but I can't figure out how it works. Can't get it to work.

I want to use the lay-out home-1 but directly under the block mainmenu i want to add a block for a slider (see attachment).
I get an error message: Blok [slider1] not found.
I have added the position to the TemplateDetail.xml file.
In which .php blockfile I have to add code and how and where?

Can somebody please help me?

Greetings,

Hadewijch
Attachments (1)
Comment
There are no comments made yet.
Accepted Answer
Accepted Answer Pending Moderation
0
Votes
Undo
Hi,

To add a new block to a layout, you have to:

1. Create the block file first (in templates/t3_bs3_blank/tpls/blocks), for example, you want to add slider block, you could add file: slideshow.php, in the file, you define positions, here is a sample:

<?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->countModules('slideshow')) : ?>
<!-- SLIDESHOW -->
<div class="container">
<div class="slideshow <?php $this->_c('slideshow') ?>">
<jdoc:include type="modules" name="<?php $this->_p('slideshow') ?>" style="raw" />
</div>
</div>
<!-- //SLIDESHOW -->
<?php endif ?>


The slideshow block includes slideshow module.

2. Open the layout file you want to load the block (home-1.php) and define the block in the position you want in the layout using the format:

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


Now you can open the template style that using home-1 layout and you will see slideshow block is added and you see the <code>slideshow</code> module position in the block. You can add module and assign the module to the position.

Regards.
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
Great! Thank you for the answer. It's working fine!
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
Nice to see it help you.

Regards.
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.