T3 Community Discussion & Support

Let's build the best free Joomla template framework, together!
  1. sharojit sheel
  2. General Discussion
  3. Wednesday, 07 May 2014
  4.  Subscribe via email
I need to create some module position. I did:

# create a block in : "root-path\templates\t3\tpls\blocks" and named it positionname.php. the code like this below

<?php if ($this->countModules('name')) : ?>
<!-- my position -->
<div class="wrap t3-name <?php $this->_c('name') ?>">
<jdoc:include type="modules" name="<?php $this->_p('name') ?>" />
</div>
<!-- //my position -->
<?php endif ?>


# then "root-path\templates\t3\tpls\default.php" and add
<?php $this->loadBlock('name') ?>

# and then added
<positions><position>name</position></positions>
in "templateDetails.xml"

The template manager show me it is running but when i published something there that's not working. Do i missed anything ?

Waiting for your positive reply.
Comment
There are no comments made yet.
Accepted Answer
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Sharojit,

In the default.php, you have to load the positionname.php block as you define position in the block, you can not load position directly to the layout file. Structure of t3 layouts is that each layout is built up from multiple blocks, each block load one or many positions.

Please try to change the code:

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


to:

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


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


There are replies in this post but you are not allowed to view the replies from this post.