views:

488

answers:

4

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 -->
+2  A: 

Just use a module and define which page you want to show it on using the admin menu.

eTiger13
A: 

You can do all of this through your Joomla administrative back end. You can define which modules show up where inside each individual module on the bottom left side. Additionally, in the menu manager you can define a menu tab to only display a certain section, category or article, amongst other things.

Matt Nathanson
A: 

When logged into the administrator site, select Content > Article Manager.

When you create a new article, you will see radio button options to display it on the Front Page (as well as assign the article to a section or category you have already defined).

If the article already exists, just click on its title to edit it--the edit screen will display the available options.

A: 

doesn't give you much to work with divs and formatting if you use a module.. I like to keep modules for editing text only.

phpjoel