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