Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • surdo Friend
    #206215

    Hello, I am trying to create a new independent block in my template, please see the attached screenshot template.jpg

    I think I should be doing this in the file /templates/ja_nuevo/tpls/blocks/mainbody/two-sidebar.php
    (also attached – and please see the comment: <!– changes should go here –>), however I’ve not managed to add the new block with out messing up the template/pages.

    Can someone please help?

    Thank you!


    1. template
    1. two-sidebar.php
    surdo Friend
    #569998

    I see now that the modification needs to be within the same div. I can create a non-independent block with the following:

    <!– SIDEBAR 1 –>
    <div class=”t3-sidebar t3-sidebar-1 col-xs-6 col-md-3 col-md-pull-6 <?php $this->_c($vars[‘sidebar1’
    ]) ?>”>
    <jdoc:include type=”modules” name=”<?php $this->_p($vars[‘sidebar1’]) ?>” style=”T3Xhtml” />

    <jdoc:include type=”modules” name=”<?php $this->_p($vars[‘sidebar1’]) ?>” style=”T3Xhtml” />
    </div>
    <!– changes should go here –>
    <!– //SIDEBAR 1 –>

    In this case the location stored within “sidebar1” is duplicated. sidebar2 already exists however I do not want to use it. How do I define a “sidebar3” to create an independent block? I can’t see where this is done.

    Thanks

    surdo Friend
    #735071

    I see now that the modification needs to be within the same div. I can create a non-independent block with the following:

    <!– SIDEBAR 1 –>
    <div class=”t3-sidebar t3-sidebar-1 col-xs-6 col-md-3 col-md-pull-6 <?php $this->_c($vars[‘sidebar1’
    ]) ?>”>
    <jdoc:include type=”modules” name=”<?php $this->_p($vars[‘sidebar1’]) ?>” style=”T3Xhtml” />

    <jdoc:include type=”modules” name=”<?php $this->_p($vars[‘sidebar1’]) ?>” style=”T3Xhtml” />
    </div>
    <!– changes should go here –>
    <!– //SIDEBAR 1 –>

    In this case the location stored within “sidebar1” is duplicated. sidebar2 already exists however I do not want to use it. How do I define a “sidebar3” to create an independent block? I can’t see where this is done.

    Thanks

    surdo Friend
    #570000

    Almost there:

    modified the mainbody.php file to create a new “sidebar3 variable” (see mainbody_cen.php attached) and adjusted two-sidebar.php to include:

    ——————
    <!– SIDEBAR 1 –>
    <div class=”t3-sidebar t3-sidebar-1 col-xs-6 col-md-3 col-md-pull-6 <?php $this->_c($vars[‘sidebar1’
    ]) ?>”>
    <jdoc:include type=”modules” name=”<?php $this->_p($vars[‘sidebar1’]) ?>” style=”T3Xhtml” />

    <!– my change here –>
    <jdoc:include type=”modules” name=”<?php $this->_p($vars[‘sidebar3’]) ?>” style=”T3Xhtml” />
    </div>
    <!– //SIDEBAR 1 –>
    ————————–

    Now, the new block shows up in the layout and allows me to store new locations. For example in the attached screenshot block2.jpg the block is showing position-14.

    This great, however when I assign position-14 to a particular module, it fails to show up on the page.

    Am I missing something?

    Thanks


    1. block2
    1. mainbody_cen.php
    surdo Friend
    #735072

    Almost there:

    modified the mainbody.php file to create a new “sidebar3 variable” (see mainbody_cen.php attached) and adjusted two-sidebar.php to include:

    ——————
    <!– SIDEBAR 1 –>
    <div class=”t3-sidebar t3-sidebar-1 col-xs-6 col-md-3 col-md-pull-6 <?php $this->_c($vars[‘sidebar1’
    ]) ?>”>
    <jdoc:include type=”modules” name=”<?php $this->_p($vars[‘sidebar1’]) ?>” style=”T3Xhtml” />

    <!– my change here –>
    <jdoc:include type=”modules” name=”<?php $this->_p($vars[‘sidebar3’]) ?>” style=”T3Xhtml” />
    </div>
    <!– //SIDEBAR 1 –>
    ————————–

    Now, the new block shows up in the layout and allows me to store new locations. For example in the attached screenshot block2.jpg the block is showing position-14.

    This great, however when I assign position-14 to a particular module, it fails to show up on the page.

    Am I missing something?

    Thanks

    surdo Friend
    #570017

    worked it all out – I hadn’t edited mainbody.php properly – it was missing some necessary permutations in that logical statement. I’ll click the close thread button – sorry for all the noise

    surdo Friend
    #735089

    worked it all out – I hadn’t edited mainbody.php properly – it was missing some necessary permutations in that logical statement. I’ll click the close thread button – sorry for all the noise

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

This topic contains 7 replies, has 1 voice, and was last updated by  surdo 8 years, 12 months ago.

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