Most Joomla templates show the Joomla Frontpage (the content area) on the first page of your website. However, sometimes you just want a mixup of several modules, without articles to be published directly on your first page.

So, how are we going to prevent that the Joomla frontpage will be shown? It’s not that hard to adjust the template files in such a way that it will be hidden. At a minimum you need access to the template php file, called index.php. You can edit it using the joomla backend. Goto extensions / manage templates, select your template by clicking the name and then click edit html. However, it is more easy to use an ftp client to access the file within in the joomla templates/templatename folder.

Search within the index.php file for the following code:

<jdoc:include type="component" style="xhtml" />

And replace it with this:
<?php $pageview = JRequest::getVar('view', '');
$jb_frontpage = $this->params->get('showfrontpagearticles'); ?><br />
<!-- Main content hide it on the frontpage --></p>
<div id="content">
<jdoc:include type="component" style="xhtml" />
</div>
<p>

Most likely the divs are already existing in your template and “content” is probably named something else. That’s all there is to it. This simple change will hide the frontpage from the front page 🙂

Now we can make things slightly more complicated. Especially when you’re creating your own template for the community or a customer it is useful to let the user of the template decide whether or not to hide the joomla frontpage. To be able to do that we’ll simply add a template parameter. You cannot make this change anymore from the joomla backend. Direct access to the template files is necessary to be able to add the following lines in your templateDetails.xml file:

<param name="showfrontpagearticles" type="radio" default="1" label="Show Frontpage articles" description="Set this value to Y to show the frontpage, otherwise it will be hidden"><option value="0">No - hide it</option><option value="1">Yes - show it</option></param>

Add the lines above in the section of the file and save it. Next we need an additional change in our index.php. Find back the part where the component is loaded and now change it to the following:

<?php $pageview = JRequest::getVar('view', '');
$jb_frontpage = $this->params->get('showfrontpagearticles'); ?><br />
<!-- Main content hide it on the frontpage --></p>
<div id="content">
  <jdoc:include type="component" style="xhtml" />
</div>
<p><?php } Elseif ($jbfrontpage="1") { ?></p>
<div id="content">
  <jdoc:include type="component" style="xhtml" />
</div>
<p> <?php } ; ?>

Using this code will hide the frontpage at your website’s home depending on the value of the parameter set by the user.