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.