definitive answer please to modifying templates and stylesheets of ezflow extension

Author Message

Andy Woods

Monday 21 February 2011 11:41:58 am

Hi,

I've installed ezPublish 4.4 using ezflow_clean.

I've spent ages trying to understand how to use my own templates and stylesheets.

Can someone please give me the definitive steps to follow?

Thanks,

Andy

Theodoros Papageorgiou

Wednesday 23 February 2011 3:50:48 am

1. Create a new design extension directory like this
extension/my_design/design/my_design

2. Create a design.ini.append.php file in 'extension/my_design/settings/' with this code:
<?php /*
[ExtensionSettings]
DesignExtensions[]=my_design
*/
?>

3. Copy ONLY the files you want to edit from ezwebin and the other designs you use (standard, ezflow) to the exact path inside your own design extension (for example extension/my_design/design/my_design/templates/pagelayout.tpl).
You can view on your webpages which template files you need to edit by enabling debug output from the admin interface and clearing the cache.

4. Copy your css files, into 'extension/my_design/design/my_design/stylesheets/' and make sure you have the correct image paths to your css.

5. Copy your js files into 'extension/my_design/design/my_design/javascript/'

6. Copy your image files into 'extension/my_design/design/my_design/images/'

7. In your settings/siteaccess/my_siteaccess/site.ini.append.php setup the design order, like:
[DesignSettings]
SiteDesign=my_design
AdditionalSiteDesignList[]
AdditionalSiteDesignList[]=ezflow
AdditionalSiteDesignList[]=ezwebin
AdditionalSiteDesignList[]=base

8. Activate your design extension from the admin > Setup > Extensions (or edit the settings/override/site.ini.append.php and add ActiveExtensions[]=my_design ). Clear the cache.

I hope this helps!

WEBWiZ
Web Development
http://www.webwiz.gr

Andy Woods

Thursday 24 February 2011 3:24:53 am

Hi,

Thank you for your help.

I followed your steps but the only way I got it to use my templates work was to use the path:
/extension/my_design/design/ezwebin/templates

If I didn't specify 'ezwebin' in the path it didn't work.

I have placed 2 stylesheets (site-colors.css and classes-colors.css) at /extension/my_design/design/ezwebin/stylesheets but unfortunately they're not being picked up. If I vew the source of the web page I can see the following

<<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://www.usincare.org.uk/var/storage/packages/eZ-systems/ezflow_design/files/default/file/classes-colors.css" mce_href="view-source:http://www.usincare.org.uk/var/storage/packages/eZ-systems/ezflow_design/files/default/file/classes-colors.css">/var/storage/packages/eZ-systems/ezflow_design/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://www.usincare.org.uk/var/storage/packages/eZ-systems/ezflow_design/files/default/file/site-colors.css" mce_href="view-source:http://www.usincare.org.uk/var/storage/packages/eZ-systems/ezflow_design/files/default/file/site-colors.css">/var/storage/packages/eZ-systems/ezflow_design/files/default/file/site-colors.css</a><span>" </span><span class="error"><span class="attribute-name">/</span></span>>

The web site is at: http://www.usincare.org.uk/index.php

Can you help me with getting my stylesheets to be used please?

Thanks,

Andy

Andy Woods

Thursday 24 February 2011 4:55:48 am

I've just changed the following settings in /settings/siteaccess/my_site/design.ini.append.php

SiteCSS=extension/my_design/design/ezwebin/override/stylesheets/site-colors.css
ClassesCSS=extension/my_design/design/ezwebin/override/stylesheets/classes-colors.css

and it seems to be working.

Is this the right thing to have done?

Theodoros Papageorgiou

Thursday 24 February 2011 10:35:38 am

Hi,

I think you should first rename your design extension like this:

extension/usincare/design/usincare/

In extension/usincare/settings/design.ini.append.php you should have:
DesignExtensions[]=usincare

You should also have an identical named siteaccess:
settings/siteaccess/usincare/

Then in step 7:
SiteDesign=usincare

In your settings/siteaccess/usincare/design.ini.append.php you may declare your styles and javascripts like this:

[JavaScriptSettings]
JavaScriptList[]=video.js
JavaScriptList[]=fonts/MgOpen_Moderna_400.font.js

Then you can load your stylesheets by overriding the page_head_style.tpl like this:

{ezcss_load( array( 'debug.css',
'custom.css',
'screen.css',
'websitetoolbar.css',
ezini( 'StylesheetSettings', 'CSSFileList', 'design.ini' )
))}

and your javascripts by overriding the page_head_script.tpl:

{ezscript_load( ezini( 'JavaScriptSettings', 'JavaScriptList', 'design.ini' ) )}

Good luck!

WEBWiZ
Web Development
http://www.webwiz.gr

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 30 2025 01:05:46
Script start
Timing: Jan 30 2025 01:05:46
Module start 'layout'
Timing: Jan 30 2025 01:05:46
Module start 'content'
Timing: Jan 30 2025 01:05:46
Module end 'content'
Timing: Jan 30 2025 01:05:46
Script end

Main resources:

Total runtime0.0146 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0043 588.6250151.2734
Module start 'layout' 0.00430.0022 739.898436.7969
Module start 'content' 0.00650.0066 776.695398.3594
Module end 'content' 0.01310.0014 875.054737.9766
Script end 0.0145  913.0313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002315.4753140.0002
Check MTime0.00117.3790140.0001
Mysql Total
Database connection0.00053.619110.0005
Mysqli_queries0.002013.759130.0007
Looping result0.00000.081910.0000
Template Total0.00106.810.0010
Template load0.00085.268210.0008
Template processing0.00021.531210.0002
Override
Cache load0.00053.661710.0005
General
dbfile0.003020.831980.0004
String conversion0.00000.075340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs