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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 01:09:09
Script start
Timing: Jan 19 2025 01:09:09
Module start 'layout'
Timing: Jan 19 2025 01:09:09
Module start 'content'
Timing: Jan 19 2025 01:09:10
Module end 'content'
Timing: Jan 19 2025 01:09:10
Script end

Main resources:

Total runtime0.7118 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.1563152.6250
Module start 'layout' 0.00540.0031 741.781339.4453
Module start 'content' 0.00850.7018 781.2266492.5938
Module end 'content' 0.71030.0014 1,273.820312.1641
Script end 0.7118  1,285.9844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4754160.0002
Check MTime0.00130.1859160.0001
Mysql Total
Database connection0.00080.110110.0008
Mysqli_queries0.660292.7571630.0105
Looping result0.00080.1079610.0000
Template Total0.684096.120.3420
Template load0.00200.282720.0010
Template processing0.682095.808820.3410
Template load and register function0.00020.025310.0002
states
state_id_array0.00140.193010.0014
state_identifier_array0.00080.107220.0004
Override
Cache load0.00170.2443310.0001
Sytem overhead
Fetch class attribute can translate value0.00110.149220.0005
Fetch class attribute name0.00130.184650.0003
XML
Image XML parsing0.00030.045520.0002
class_abstraction
Instantiating content class attribute0.00000.001550.0000
General
dbfile0.00060.0858100.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs