1 Css to apply home page layout different from its subpages?

Discussion and education for beginner / novice programmers interested in embarking on the development process to take advantage of the extensible nature of the Joomla! CMS.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Forum rules
Post Reply
adibgb
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Mar 14, 2008 8:18 am

1 Css to apply home page layout different from its subpages?

Post by adibgb » Fri Mar 14, 2008 8:26 am

Hi guys. very new here, did a few easy templates and now im stuck with one.

basically i wud like the home page to have a '3-white column' layout while its subpages
will have '2-white and brown column' layout.

the only way i can do this is to make the article static in joomla preformatted with the coloured columns.
but that would defeat the purpose for having joomla..

do i need to have multiple css or a javascript to call the different layouts?
currenly i have no idea even after reading thru some css samples.

ive also seen samples using <?php echo $showRightColumn ? 'contentarea2' : 'contentarea'; ?>
and jdoc:include components to achieve this.

can anyone help guide me? :(
much appreciated thnx.

User avatar
Rogue4ngel
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 199
Joined: Sun Nov 26, 2006 10:46 pm
Location: New York

Re: 1 Css to apply home page layout different from its subpages?

Post by Rogue4ngel » Fri Mar 14, 2008 2:21 pm

You can create 'collapsable' columns, that would allow you to accomplish what you are looking for. It's a mix of css and php coding.

Here's a good article that details it a bit:
http://www.webreference.com/authoring/s ... index.html

If you just want to have the same columns, but different styles, I am sure you could have multiple templates loaded, and then have to code which one is used depending on the page displayed?

That I wouldn't know how to do that, but I would suspect there is a way.
If you're not a part of the solution, you're a part of the problem.

adibgb
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Mar 14, 2008 8:18 am

Re: 1 Css to apply home page layout different from its subpages?

Post by adibgb » Sat Mar 15, 2008 2:36 am

i dun understand 'collapsing column'.. cud u explain this?

but thanks to ur link i think i can come up with a way to style certain modules
and so ill simply use a different module for the home page than the subpages
to show the difference . :)

User avatar
Rogue4ngel
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 199
Joined: Sun Nov 26, 2006 10:46 pm
Location: New York

Re: 1 Css to apply home page layout different from its subpages?

Post by Rogue4ngel » Sat Mar 15, 2008 9:15 pm

Yes, that would most likely be a good way to do it. Let me know how it works out.
If you're not a part of the solution, you're a part of the problem.


Post Reply