Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • DreamWeb Friend
    #150487

    Hey everyone.

    I want to completely collapse the frontpage content area of the 1.5 JA_Purity template, but keep the subpages intact. I’ve found instructions on how to do this for other templates, but not for Purity and my PHP coding skills aren’t sufficient enough to do it from scratch.

    Here’s the method for the RAISITE template, for example

    [PHP]<!–ONLY SHOW CONTENT ON SECONDARY PAGES –>

    <?php if ( !$this->isFrontPage() ) : ?>
    <!– MAIN CONTAINER –>
    <div id=”ja-container” class=”wrap <?php echo $this->getColumnWidth(‘cls_w’); ?>”>
    <div class=”main”>

    <div class=”ja-rs2-top”><div class=”ja-rs2-tl”> </div><div class=”ja-rs2-tr”> </div></div>

    <div class=”ja-rs2-mid”><div class=”ja-rs2-ml”><div class=”ja-rs2-mr clearfix”>

    <?php $this->loadBlock(‘breadcrumb’) ?>

    <div id=”ja-mainbody” style=”width:<?php echo $this->getColumnWidth(‘mw’) ?>%”>
    <?php $this->loadBlock(‘main’) ?>
    <?php $this->loadBlock(‘left’) ?>
    </div>
    <?php $this->loadBlock(‘right’) ?>
    </div></div></div>

    <div class=”ja-rs2-bot”><div class=”ja-rs2-bl”> </div><div class=”ja-rs2-br”> </div></div>

    <?php $this->loadBlock(‘bot’) ?>

    </div>
    </div>
    <!– //MAIN CONTAINER –>

    <?php endif; ?>

    <!–END ONLY SHOW CONTENT ON SECONDARY PAGES –> [/PHP]

    Any help is appreciated!

    Thanks.

    DreamWeb Friend
    #340842

    Thanks to the joomla forums, I managed to figure this out.

    Original post here:

    http://forum.joomla.org/viewtopic.php?f=469&t=322675

    What you can do is edit the index.php file of your template. After the check for _JEXEC define add the following code

    [PHP]$pageview = JRequest::getVar(‘view’, ”);[/PHP]

    Those two lines should now look like this:

    [PHP]defined( ‘_JEXEC’ ) or die( ‘Restricted access’ );
    $pageview = JRequest::getVar(‘view’, ”);[/PHP]

    Now place this line above the section you’d like to NOT show up on the frontpage of your website

    [PHP]<?php if ($pageview != ‘frontpage’) : ?>[/PHP]

    And place this code at the bottom of the section you’d like to NOT show up on the frontpage of your website:

    [PHP]<?php endif; ?>[/PHP]

    And that’s it. In my case, I placed these around the entire CONTAINER + PATHWAY sections.

    Thanks!

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

This topic contains 2 replies, has 1 voice, and was last updated by  DreamWeb 14 years, 7 months ago.

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