test
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • Henning Friend
    #196737

    Hi Guys,

    I’m trying to add the slideshow above the main content and not on top of it. I have attached a preview of what I’m looking for. Next to Sidebar and above the main body. Currently the slideshow appears above the t3-mainbody. Any ideas?

    Regards,
    Henning


    1. Ja-Purity-III
    swissa Friend
    #530805

    What template are you using – i.e. what layout did you pick for this page?

    Good idea before you start editing the code is to
    1. do a backup! and
    2. follow this POST so that we protect on updates.

    Then we can look at changing the code in the backend to sit a slideshow within the main content block.

    Henning Friend
    #530811

    Hi Swissa,

    Thanks for your response. I am using the Portfolio layout.

    1. I have made a Backup using Akeeba
    2. I have made a copy of the ‘template.css’ and renamed as ‘custom.css’

    Awaiting further instructions.

    Regards,
    Henning

    swissa Friend
    #530813

    You need to do the suggestions in my other post – here

    Clone both the portfolio layout and call it myportfolio and clone the theme you are using and call it mytheme so that they don’t get overwritten on any update.

    Then do another backup! Once you’ve done that we edit the code.

    Henning Friend
    #530816

    Hi Swissa,

    Thanks again, glad you reminded me to clone the Layout and Theme. All of the suggestions mentioned in the ‘Upgrade Template’ post have been made. I have just finished with the Backup and I’m now downloading the copy locally.

    We can start editing the code?

    Regards,
    Henning

    swissa Friend
    #530820

    Before you start I don’t know if you are using 1 sidebar, no sidebar etc so this shows for no sidebar. The same steps should be taken with your layout – if that makes sense…

    Using your ftp client go to purityiii/tpls/blocks/mainbody/ and copy no-sidebar.php and call it myno-sidebar.php

    Open it and edit it

    here is the full code you need so just replace what you have there. (code in red is the new stuff or the changes in each file so that you see what we are doing)

    <?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;

    /**
    * Mainbody 3 columns, content in center: sidebar1 - content - sidebar2
    */
    ?>

    <div id="t3-mainbody" class="container t3-mainbody">
    <div class="row">

    <!-- MAIN CONTENT -->
    <div id="t3-content" class="t3-content col-xs-12 col-md-6 col-md-push-3">
    <?php if($this->hasMessage()) : ?>
    <jdoc:include type="message" />
    <?php endif ?>
    <jdoc:include type="modules" name="<?php $this->_p('swissa') ?>" />
    <jdoc:include type="component" />

    </div>
    <!-- //MAIN CONTENT -->

    <!-- 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" />
    </div>
    <!-- //SIDEBAR 1 -->

    <!-- SIDEBAR 2 -->
    <div class="t3-sidebar t3-sidebar-2 col-xs-6 col-md-3 <?php $this->_c($vars['sidebar2']) ?>">
    <jdoc:include type="modules" name="<?php $this->_p($vars['sidebar2']) ?>" style="T3Xhtml" />
    </div>
    <!-- //SIDEBAR 2 -->

    </div>
    </div>

    Now we need to go to purityiii/tpls/blocks and edit mainbody.php

    <?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

    /**
    * Mainbody 3 columns, content in center: sidebar1 - content - sidebar2
    */

    // positions configuration
    $sidebar1 = 'sidebar-1';
    $sidebar2 = 'sidebar-2';

    $sidebar1 = $this->countModules($sidebar1) ? $sidebar1 : false;
    $sidebar2 = $this->countModules($sidebar2) ? $sidebar2 : false;

    // detect layout
    if ($sidebar1 && $sidebar2) {
    $this->loadBlock('mainbody/two-sidebar', array('sidebar1' => $sidebar1, 'sidebar2' => $sidebar2));
    } elseif ($sidebar1) {
    $this->loadBlock('mainbody/one-sidebar-left', array('sidebar' => $sidebar1));
    } elseif ($sidebar2) {
    $this->loadBlock('mainbody/one-sidebar-right', array('sidebar' => $sidebar2));
    } else {
    $this->loadBlock('mainbody/myno-sidebar');
    }

    We just changed the nosidebar.php to myno-sidebar.php

    Lastly go to purityii/templatedetails.xml and edit it to add

    <position>swissa</position>
    at the end of all the other positions.

    now go to Template Manager / my portfolio and click on Layout tab.

    You’ll see the slideshow above the component but between the two sidebars. Now you can add a slideshow or other module into position ‘swissa’ and assign it to that page.

    Let me know if it works and if not provide a url please.

    Have fun!

    Henning Friend
    #530821

    Hi Swissa,

    I have made all the changes as mentioned above. I have cleared my cache and the ‘Slideshow’ still doesn’t seem to be showing. I have sent you the url and login details.

    Regards,
    Henning

    swissa Friend
    #530828

    Take a look and see if that does it for you.

    Henning Friend
    #530836

    Thanks Swissa, I really appreciate the work that you have done! It’s looking great! Were you able to figure out what I did wrong?

    Regards,
    Henning

    swissa Friend
    #530837

    I built new template files and blocks from the originals and called them from the new template – you’d assigned the default to the page so just changed it to the new one.

    I’d do another backup to save all the changes. Good luck with the future dev.

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

This topic contains 10 replies, has 2 voices, and was last updated by  swissa 10 years, 8 months ago.

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