What can I find here?

Here you can find various tutorials regarding custom development of Joomla extensions and templates. Also, here you can read articles on how to install our free Joomla themes and how to customize it to suit your needs. 

Need custom stuff?

If  you need a custom Joomla development like templates, modules, components or plugins contact us using email form >>>

Who's Online

Styling frontpage in different way - UPDATED PDF Print E-mail
Monday, 23 July 2007

Perhapse you will never need this trick but it is very helpfull if you wish to style your frontpage with modules instead standard Joomla frontpage option. 

 

Using variable $option you can determine whether are you on frontpage or not. 

 

Code:

 

if($option == '' || $option == 'com_frontpage')
{
    mosLoadModules('user1'); 
else
{
    mosMainBody(); 

 

Now, if you are on frontpage instead of standard Joomla frontpage you will see user1 module position, but if you go to any other section then standard Joomla frontpage will be displayed.

 

This is relly helpfull when you develop templates.  

 

Check www.livno-online.com where we styled frontpage using this little trick. Overall frontpage on this site is styled with modules.

 

Here is the code I have used at www.livno-online.com:

 

            <? if($option=='' || $option=='com_frontpage') { ?>
                <div class="user1"><? mosLoadModules('user1',-2); ?></div>
                <div class="user2"><? mosLoadModules('user2',-2); ?></div>
                <div class="clr"></div>
            <? } else { ?>
                <div class="content"><? mosMainBody(); ?></div>
            <? } ?>

 

Notice: This trick only works on Joomla 1.0.x versions.

 

 

 

 





Digg!Reddit!Del.icio.us!Google!Live!Facebook!Slashdot!Technorati!Yahoo!
Comments (14)Add Comment
...
written by demux, July 23, 2007
it's really cool. Always looking for something like this. Hope it will work for me.

I have one question. Where do i insert that code? in the index.php template?
...
written by Zoran, July 23, 2007
Code is inserted into index.php.
...
written by Olnets, August 06, 2007
HI!

How i'm paste this code to my template?:













...
written by Olnets, August 06, 2007











...
written by -, August 08, 2007
The php command essentially replaces the frontpage component with the module of your choice. Very clever. Where can I learn more about customizing modules. Ideally I would like to be able to use frontpage, but customize part of it to have some kind of static content.
...
written by test, August 08, 2007
Your comment is too short
...
written by Niklas, August 17, 2007
I dont get it, where to put the code and how to get it to work?
It would help with some more guides to get this result.
...
written by ..., August 17, 2007
Please writing tutorial on this subject. Step by step. Please!!!
...
written by ..., August 17, 2007
this code don't working!
...
written by ..., August 17, 2007
This is full command?
...
written by Niklas, August 17, 2007
I dont get it either, and only get error message if i past the code on to the index files.
...
written by Niklas, August 19, 2007
Hello, is this page dead??
Why put a code in the article and then dont post a guide how to be able to use the code right?
...
written by ..., August 19, 2007
Hello Man! Please update this post. This code is complete?
...
written by Zoran, September 04, 2007
I have added code which has been used at www.livno-online.com

Write comment

Copyright 2007. All Rights Reserved.
busy