Different css for each node possible?

Author Message

Noicokuna Niemoge

Friday 30 January 2009 5:22:26 am

Hi there;

Just as the title says, I wonder if anyone tried this approach. I'd like to have slightly different colours in each node, I wonder if it's possible?

Thanks in advance.

Shiki soku ze ku...

Fátima Chapri

Friday 30 January 2009 12:13:41 pm

Hi Noicokuna,

I tried that once and I worked with the class of the main div of the page.

Let's Imagine an example where the id of the node you want to have in a different color is 2. Than, the div#page will be presented like:

<body>
<div id="page" class="sidemenu extrainfo section_id_1 subtree_level_0_node_id_2 current_node_id_2">
......
......
</div>
</body>

You can use the class

.current_node_id_2

to define different colors for each node.

Noicokuna Niemoge

Saturday 31 January 2009 5:41:48 am

Thank you :)

So it means that I'll have to create styles for each child node as well. Well, but it's good it's possible at least. :)

Shiki soku ze ku...

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 03:37:17
Script start
Timing: Jan 19 2025 03:37:17
Module start 'layout'
Timing: Jan 19 2025 03:37:17
Module start 'content'
Timing: Jan 19 2025 03:37:18
Module end 'content'
Timing: Jan 19 2025 03:37:18
Script end

Main resources:

Total runtime0.9941 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.2734152.6406
Module start 'layout' 0.00560.0023 741.914139.4766
Module start 'content' 0.00790.9848 781.3906495.8203
Module end 'content' 0.99270.0013 1,277.21098.1406
Script end 0.9940  1,285.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3469160.0002
Check MTime0.00150.1514160.0001
Mysql Total
Database connection0.00100.098310.0010
Mysqli_queries0.951195.6750570.0167
Looping result0.00060.0629550.0000
Template Total0.963997.020.4819
Template load0.00210.216120.0011
Template processing0.961796.746520.4809
Template load and register function0.00010.014910.0001
states
state_id_array0.00060.064310.0006
state_identifier_array0.00190.192920.0010
Override
Cache load0.00190.1871170.0001
Sytem overhead
Fetch class attribute can translate value0.00050.045720.0002
Fetch class attribute name0.00170.171230.0006
XML
Image XML parsing0.00030.031120.0002
class_abstraction
Instantiating content class attribute0.00000.001030.0000
General
dbfile0.00130.1262100.0001
String conversion0.00000.000840.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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: 12
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs