Stylesheets - I'm at a loss

Author Message

Steven Stieng

Thursday 03 June 2010 7:51:01 am

In my pagelayout.tpl I have following code:

{include uri='design:page_head.tpl'}
{include uri='design:page_head_style.tpl'}
{include uri='design:page_head_script.tpl'}

page_head_style.tpl is located in the same folder as pagelayout.tpl

The page_head_style.tpl  has the following code: 

<style type="text/css">
    @import url({"stylesheets/core.css"|ezdesign(nor)});
    @import url({"stylesheets/debug.css"|ezdesign(en)});
    @import url({"stylesheets/pagelayout.css"|ezdesign(nor)});
    @import url({"stylesheets/content.css"|ezdesign(nor)});  
</style>
 

Problem 1
Even if I remove all code inside page_head_style.tpl, it still displays / uses the correct CSS. How can that be?

I do have other test installations with the same code (more or less), but this should not affect what stylesheets I use. 

 Problem 2

 Looking at the source code, I see two additional style sheets:

<<SPAN class="start-tag">link</SPAN><SPAN class="attribute-name"> rel</SPAN>=<SPAN class="attribute-value">"stylesheet" </SPAN><SPAN class="attribute-name">type</SPAN>=<SPAN class="attribute-value">"text/css" </SPAN><SPAN class="attribute-name">href</SPAN><SPAN>="</SPAN><A href="view-source:http://localhost/nokernok/var/storage/packages/eZ-systems/ezwebin_design_blue/files/default/file/classes-colors.css" mce_href="view-source:http://localhost/nokernok/var/storage/packages/eZ-systems/ezwebin_design_blue/files/default/file/classes-colors.css">/nokernok/var/storage/packages/eZ-systems/ezwebin_design_blue/files/default/file/classes-colors.css</A><SPAN>" </SPAN><SPAN class="error"><SPAN class="attribute-name">/</SPAN></SPAN>> <<SPAN class="start-tag">link</SPAN><SPAN class="attribute-name"> rel</SPAN>=<SPAN class="attribute-value">"stylesheet" </SPAN><SPAN class="attribute-name">type</SPAN>=<SPAN class="attribute-value">"text/css" </SPAN><SPAN class="attribute-name">href</SPAN><SPAN>="</SPAN><A href="view-source:http://localhost/nokernok/var/storage/packages/eZ-systems/ezwebin_design_blue/files/default/file/site-colors.css" mce_href="view-source:http://localhost/nokernok/var/storage/packages/eZ-systems/ezwebin_design_blue/files/default/file/site-colors.css">/nokernok/var/storage/packages/eZ-systems/ezwebin_design_blue/files/default/file/site-colors.css</A><SPAN>" </SPAN><SPAN class="error"><SPAN class="attribute-name">/</SPAN></SPAN>> 

 Where on earth do these style sheets come from?
And how do I get rid of them? 

It really looks like it's using another file called page_head_style.tpl, but I can't figure out where this file is located. 

Looking at the debug output, it shows that is actually uses the file from:

extension/ezjscore/design/ezwebin/templates/page_head_style.tpl

 How do I override this?

André R.

Thursday 03 June 2010 9:05:37 am

copy extension/ezjscore/design/ezwebin/templates/page_head_style.tpl into your own extension / design that has higher priority then ezjscore / ezwebin(design).

site-colors and classes-colors comes from this code:

<link rel="stylesheet" type="text/css" href={ezini('StylesheetSettings','ClassesCSS','design.ini')|ezroot()} />
<link rel="stylesheet" type="text/css" href={ezini('StylesheetSettings','SiteCSS','design.ini')|ezroot()} />

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Steven Stieng

Tuesday 08 June 2010 12:28:06 am

I'm already using page_head_style.tpl which is located in extension\ezwebin\design\ezwebin\templates. 

I see that if I change the ezjscore file, I get a different output.

So the question is, why is isn't this file overridden by my custom style file?

Doug Brethower

Tuesday 08 June 2010 8:09:29 am

To clarify Andre "higher priority" regarding extensions..

http://share.ez.no/forums/setup-design/ini-settings-override-order

Post by Nicolas is the condensed version of the thread.

Hope this helps!

Doug Brethower
Apple Certified Technical Consultant, Southwest, MO USA
http://share.ez.no/directory/companies/lakedata.net

Steven Stieng

Wednesday 09 June 2010 2:10:40 am

It's all good and fine to know what order the INI files are loaded.
(even the eZ developer team didn't know this without having to discuss it)

But how has that got to do with  what CSS file is loaded?
Shouldn't all code, be it in CSS or templates, I put into  extension\ezwebin\design\ezwebin\ override any default configuration?

Do I really have to find whatever INI file and tell it to use the different CSS files I create? It really should be enough to only add the default HTML code in the template.  

Olaf Fichtner

Tuesday 15 June 2010 3:24:59 am

From what I have learned so far, the priority game applies to many things, not just INI files. You can override templates, if you put yours into a folder with higher priority, and this works for stylesheets too. As for the correct order, being relatively new to this system I still need to look up details when I need them.

For myself I did something rather lazy and simple: I installed the probably only "theme" available, which is really not more than two CSS files and a bunch of images (and some setting files, somewhere), then deleted everything from the CSS files and now add exactly those portions that I want to override - works fine...

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

Main resources:

Total runtime0.7993 sec
Peak memory usage4,096.0000 KB
Database Queries70

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 587.9141152.6250
Module start 'layout' 0.00790.0041 740.539139.4453
Module start 'content' 0.01190.7858 779.9844684.6875
Module end 'content' 0.79770.0016 1,464.671920.1641
Script end 0.7993  1,484.8359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.4633160.0002
Check MTime0.00140.1744160.0001
Mysql Total
Database connection0.00090.117510.0009
Mysqli_queries0.724990.6953700.0104
Looping result0.00070.0895680.0000
Template Total0.761495.320.3807
Template load0.00240.302220.0012
Template processing0.759094.958620.3795
Template load and register function0.00020.026810.0002
states
state_id_array0.00100.130710.0010
state_identifier_array0.00110.142420.0006
Override
Cache load0.00200.2473730.0000
Sytem overhead
Fetch class attribute can translate value0.00080.104340.0002
Fetch class attribute name0.00160.195280.0002
XML
Image XML parsing0.00130.166640.0003
class_abstraction
Instantiating content class attribute0.00010.006380.0000
General
dbfile0.00090.1154240.0000
String conversion0.00000.001340.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
17content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
12content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 59
 Number of unique templates used: 9

Time used to render debug report: 0.0001 secs