How to get joomla sections to display only on certain pages?

Posted by thatryan on Stack Overflow See other posts from Stack Overflow or by thatryan
Published on 2010-04-27T18:16:01Z Indexed on 2010/04/27 19:23 UTC
Read the original article Hit count: 264

Filed under:
|

I am brand new to joomla, and am trying to have a few sections, such as a feature slider, show up only on homepage, and some other stuff show only on internal pages. I thought I was on the right track with this code, but does not work correctly. What is the best way to do this? Thank you.

    <div id="wrapper">

<!--====================HOME PAGE ONLY========================-->

<?php if(JRequest::getVar('view') == "frontpage" ) : ?>

    <div id="feature_slides" class="featuredbox-wrapper"><!--Featured Content Slider-->

        <jdoc:include type="modules" name="feature_slides" />

    </div><!-- end #feature_slides -->

<?php endif; ?>

<!--====================END HOME PAGE ONLY========================-->

<div id="main_content">

    <!--====================INTERNAL PAGE ONLY========================-->

    <?php if(!JRequest::getVar('view') == "frontpage" ) : ?>

        <h2 class="page_name">I Am An Internal Page</h2>
        <h4 class="breadcrumbs">Breadcrumbs</h4>

    <?php endif; ?>

    <!--====================END INTERNAL PAGE ONLY========================-->


    <!--====================HOME PAGE ONLY========================-->
    <?php if(JRequest::getVar('view') == "frontpage" ) : ?>

        <div id="intro">
            <jdoc:include type="modules" name="home_intro" />
        </div><!-- end #intro -->

    <?php endif; ?>

    <!--====================END HOME PAGE ONLY========================-->

    <div id="main_area" class="clearfix">
        <jdoc:include type="component" />   
    </div><!-- end #main_area -->


    <div id="certifications">
        <jdoc:include type="modules" name="certifications" />
    </div><!-- end #certifications -->

</div><!-- end main_content -->


<div id="right_sidebar">
    <jdoc:include type="modules" name="right_sidebar" />
</div><!-- end #right_sidebar -->

<div class="separator"></div><!-- end .separator -->

</div><!-- end wrapper -->

© Stack Overflow or respective owner

Related posts about joomla

Related posts about joomla1.5