Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • hrasno Friend
    #205648

    I would like to add a new block with two positions (left-size9 and right-size3) but after reading documentation and looking at default blocks I’m confused what code to use?

    I’m trued this a can see it in layout but it doesn’t work when I assign module to a left position.

    <?php
    defined('_JEXEC') or die;
    ?>

    <div id="row">
    <?php if ($this->countModules('custom')) : ?>
    <!-- left -->
    <div class="col-xs-12 col-sm-9 <?php $this->_c('left') ?>">
    <jdoc:include type="modules" name="<?php $this->_p('left') ?>" style="raw" />
    </div>
    <!-- //left -->
    <!-- right -->
    <div class="col-xs-12 col-sm-3 <?php $this->_c('right') ?>">
    <jdoc:include type="modules" name="<?php $this->_p('right') ?>" style="raw" />
    </div>
    <!-- //right -->
    <?php endif ?>
    </div>

    Basicaly I need custom block with two possitions.

    pavit Moderator
    #567498

    Hi

    You can duplicate spotlight php file and name it spotlight-3 then load it through default.php file

    1) templatest3_blanktplsdefault.php

    <head>
    <jdoc:include type="head" />
    <?php $this->loadBlock ('head') ?>
    </head>

    <body>

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

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

    <?php $this->loadBlock ('spotlight-1') ?>

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

    <?php $this->loadBlock ('spotlight-2') ?>

    <?php $this->loadBlock ('spotlight-3') ?>

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

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

    </body>

    Copy templatest3_blanktplsspotlight-2.php and rename it spotlight-3.php

    <?php if ($this->checkSpotlight('spotlight-3', 'position-10, position-11, position-12, position-13')) : ?>
    <!-- SPOTLIGHT 3 -->
    <div class="container t3-sl t3-sl-1">
    <?php
    $this->spotlight ('spotlight-3', 'position-10, position-11, position-12, position-13')
    ?>
    </div>
    <!-- //SPOTLIGHT 3 -->
    <?php endif ?>

    Using your template manager edit the positions as you wish

    Hope that helps


    1. Screenshot_6
    2. Screenshot_7
    hrasno Friend
    #567518

    It was soooo simple, thank you 🙂

    Scott Lavelle Friend
    #567687

    Just a quick note – there is one line that still needs to be modified in that code or you will run into some styling issues that might be hard to track down:


    <div class="container t3-sl t3-sl-1">

    should read


    <div class="container t3-sl t3-sl-3">

    Scott Lavelle - Technical Resource Solutions, LLC
    Certified Joomla Administrator

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 4 replies, has 3 voices, and was last updated by  Scott Lavelle 9 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum