Forums / Setup & design / definitive answer please to modifying templates and stylesheets of ezflow extension

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

eZ debug

Timing: Jan 18 2025 01:11:51
Script start
Timing: Jan 18 2025 01:11:51
Module start 'content'
Timing: Jan 18 2025 01:11:52
Module end 'content'
Timing: Jan 18 2025 01:11:52
Script end

Main resources:

Total runtime0.8716 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 596.7109180.7891
Module start 'content' 0.00740.7066 777.5000587.6563
Module end 'content' 0.71400.1574 1,365.1563341.3359
Script end 0.8715  1,706.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.4500210.0002
Check MTime0.00140.1607210.0001
Mysql Total
Database connection0.00150.173910.0015
Mysqli_queries0.783989.94202000.0039
Looping result0.00220.25631980.0000
Template Total0.842496.720.4212
Template load0.00230.261120.0011
Template processing0.840196.389520.4201
Template load and register function0.00030.029710.0003
states
state_id_array0.00100.120110.0010
state_identifier_array0.00090.102020.0004
Override
Cache load0.00200.2286760.0000
Sytem overhead
Fetch class attribute can translate value0.00160.181930.0005
Fetch class attribute name0.00110.128660.0002
XML
Image XML parsing0.00100.114330.0003
class_abstraction
Instantiating content class attribute0.00000.001770.0000
General
dbfile0.00410.4720260.0002
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
11content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 37
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs