Reputation: 506
I have been tasked to create a very specific, complex home page for our Joomla site. My first attempt was to install a module that let me include php code, CSS styling and other not-allowed stuff in the Custom HTML Module (it's called Flexi Custom Code). And it works well - as designed.
But I'm running it problems with the basic fact that all modules will be imbedded in several layers of Joomla's div structure down to the section I install that custom module (like mainbody-top for example).
So I get ugly white space at the bottom and margins on the sides I do not want. Plus lots of other things I am finding that I need to override or zero out.
My basic question is this: Is there a way to create a custom home page that Joomla does not control, but all the links on the home page go into Joomla and everything else is controlled by Joomla?
Would I have to replace the index.php in the root dir? Or the template dir? Or is there another way that is the commonly accepted method?
Upvotes: 0
Views: 620
Reputation: 7576
You can accomplish it in different ways.
1) You can create a new template and assign it to home menu item.
2) In the current template, open index.php file and check if you are on the homepage. If yes, then do what you need, just add it where you want your output to appear
$app = JFactory::getApplication();
$menu = $app->getMenu();
if ($menu->getActive() == $menu->getDefault()) {
echo 'Homepage';
}
Upvotes: 1