Forums / Setup & design / Different Css for One Site

Different Css for One Site

Author Message

John Smith

Monday 19 June 2006 8:39:11 am

hi

I want to have simple way of using different css files with one site.

For example a site top menu contains six tabs each allowing to see site tab with different css file.

Any suggestions?

Thanks

Regards
Smith

Christian Johansen

Monday 19 June 2006 11:00:33 pm

You can set a view parameter for each tab like so:

<ul>
 <li id="tab1"><a href={'/my_url/(theme)/green'|ezurl()}>My page</a></li>
 <li id="tab2"><a href={'/my_url/(theme)/orange'|ezurl()}>My page</a></li>
 ....
</ul>

Then, in your page layout you can check the view parameter:

{def $stylesheet='default.css'}
{if is_set( $module_result.view_parameters[theme] )}
{set $stylesheet=concat( $module_result.view_parameters[theme], '.css' )}
{/if}

<link rel="stylesheet" type="text/css" href={ concat( 'stylesheets', $stylesheet )|ezdesign() }

There are probably better ways to do it too, but this is one way to do it.

John Smith

Wednesday 21 June 2006 6:56:17 am

Thanks Johansen for your kind reply and help.

Here I want to clear some another way of doing the same problem.

Would it be possible to have six different sections with six different colour scheme, images, header, footers on the basis of six different siteaccess on one site.

Can it be done in that way.

Please Help.

Smith

Christian Johansen

Thursday 22 June 2006 4:46:53 am

Sure you can have six siteaccesses. Just define six site accesses and then define one design for each of them. That way the site will look differenent depending on which siteaccess you using

John Smith

Monday 26 June 2006 12:51:42 am

hi Johansen,

Thanks for you kind reply. If you dont mind, would it be possible for you to just guide me in setting up six different siteaccess.

Just need a little brief, It would be great help.

Thanks in advance.

Smith.