Templates with ezFlow

Author Message

Michael Fürst

Monday 21 April 2008 5:17:44 am

Hi there!

I'm new to eZ (former t3 user) and I'm a little bit confused cause of eZFlow.
I think i mostly understood the template system of eZ, but my question is:

Normally (without eZFlow) the design from the directory /design/<designname> are used. Wich one is used is declared in the Sitesettings ini Files.

But with eZFlow I now have a second directory with layouts in the extension directory (/extensions/ezflow/design/<designname>). I just edited some pagelayout templates an found out, that the template in the extension/ezflow directory is used.

And now I'm totally confused. What about the "original" /design folder? Is it no more used if ezFlow is installed? Or uses the templates enginge parts of both folders (overriding)?

Maybe someone can give me some hints...

Thanks a lot,
ciao,
Mike

Maxime Thomas

Monday 21 April 2008 11:32:55 pm

Hi,

eZSystems has designe the eZFlow extension to let you install it on a exstiting eZPublish. The extension mechanism gives you the possibility to tie in some part of development (design, modules, operators, datatypes, handlers) in one unified part called an extension.
So they just did a whole "app" called eZFlow.

The place is not so important due to the override system. You can by this way override existing templates without modifying original templates and finally keep independant your former set of templates. It's important when you think to upgrade your version of eZPublish.

Some information :
http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/designs
http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/designs/design_combinations#automatic_fallback

Hope it helps.

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Michael Fürst

Tuesday 22 April 2008 1:50:38 am

Hi!

Thanks for the information :) I think i understood the basic logic of template usage (overriding etc.).

But how does eZ know, wich template should be used? Especially if there are two design sets with the same name (for example "demodesign") in different directories:

<b>/design/demodesign
/extensions/ezflow/design/demodesign</b>

And in my ini there is the following sample config:

<b>[DesignSettings]
SiteDesign=demodesign
AdditionalSiteDesignList[]
AdditionalSiteDesignList[]=base
StandardDesign=standard</b>

How dow eZ handle this problem? Is the extension alway the "highest" instance? So would the extension template be used? Or has the /design template a higher priority?

Sorry for my (maybe silly) questions, but i try to understand the logic behind template handling with eZFlow...

Ciao,
Mike

André R.

Tuesday 22 April 2008 4:03:48 am

In your ezflow setup it probably look like this:

[DesignSettings]
SiteDesign=ezflow
AdditionalSiteDesignList[]
AdditionalSiteDesignList[]=ezwebin
AdditionalSiteDesignList[]=base
AdditionalSiteDesignList[]=standard

If you want to have your own design that overrides parts of the design, you can do it like this:

[DesignSettings]
SiteDesign=mydesign
AdditionalSiteDesignList[]
AdditionalSiteDesignList[]=ezflow
AdditionalSiteDesignList[]=ezwebin
AdditionalSiteDesignList[]=base
# I have reamoved standard from the AdditionalSiteDesignList
# since its used as fallback in StandardDesign setting
StandardDesign=standard

eZ Publish has a cache called template override cache, that caches information for where a given template can be found, the priority looks a bit like this:
SiteDesign
AdditionalSiteDesignList
StandardDesign

If two extensions override the same design, then the order of the extensions in the ActiveExtensions[] setting comes into play.

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

Michael Fürst

Tuesday 22 April 2008 4:44:14 am

Hi,

Ok, but thats the normal logic, it doesn't answer the question itself.

You have the following structure:

/design/mydesign
/extensions/ezflow/design/mydesign

and in your ini you define:

SiteDesign = mydesign

(without any additional designs).
Wich Design has the higher priority in this case (same name).

Mike

Maxime Thomas

Tuesday 22 April 2008 10:58:28 pm

The rule is is :
- first the standard files are loaded (eg /settings/*.*)
- then the specific files of your site access (eg settings/siteaccess/*/*.*)
- then the specific files of your siteaccess in your extensions (eg extension/*/settings/siteaccess/*/*.*)
- then the override files (eg settings/override/*.*)
- then the override files of your extension (eg extension/*/settings/override/*.*)

I'm not sure for the order of the two last, the exact rule is somewhere in the documentation.

Normally the system is made so you can put everything you do in an extension (even siteaccess settings).

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

André R.

Wednesday 23 April 2008 12:14:48 am

> Wich Design has the higher priority in this case (same name).
I'm not sure, but I would guess design in extensions override design/ designs.
But please test and share your result if possible (also on what version you are running, since 4.0 changed a few things when it comes to the override system).

Internally we doesn't use design/ designs much any more, since we try to keep custom code as separate from the core as possible, and for this extensions do pretty well.

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

Michael Fürst

Wednesday 30 April 2008 4:55:06 am

Hi!

Thanks for the responses.
I'm using 4.0.0

Ciao,
Mike

Kevin Gaudin

Thursday 05 June 2008 8:55:36 am

Hi,

I am trying to do some simple modifications to the eZ Flow design, without editing any of the ezflow extension files. My first point is to change the main content background image.

I have created a new extension in order to be able to take over ezflow, with the following content :

/extension/ezintra/settings/design.ini.append.php

<?php /*
[ExtensionSettings]
DesignExtensions[]=ezintra
*/ ?>

extension/ezintra/design/ezintra/images/page-bg.jpg (modified)

I changed /settings/override/site.ini.append.php in the extensions block :

[ExtensionSettings]
ActiveExtensions[]=ezintra
ActiveExtensions[]=ezflow
ActiveExtensions[]=ezwebin
ActiveExtensions[]=ezdhtml
ActiveExtensions[]=ezodf

And set my siteaccess site.ini.append.php design block :

[DesignSettings]
SiteDesign=ezintra
AdditionalSiteDesignList[]
AdditionalSiteDesignList[]=ezflow
AdditionalSiteDesignList[]=ezwebin
AdditionalSiteDesignList[]=base
AdditionalSiteDesignList[]=standard

I tried to put my extension and design declarations before or after ezflow but never managed to get my modified image on my site...

What am I missing ?

Thanks for your help !!!!

Twitter: @kevingaudin

Frederik Krautwald

Saturday 13 November 2010 3:33:38 pm

"

Hi,

I am trying to do some simple modifications to the eZ Flow design, without editing any of the ezflow extension files. My first point is to change the main content background image.

I have created a new extension in order to be able to take over ezflow, with the following content :

/extension/ezintra/settings/design.ini.append.php

<?php /*
[ExtensionSettings]
DesignExtensions[]=ezintra
*/ ?>

extension/ezintra/design/ezintra/images/page-bg.jpg (modified)

I changed /settings/override/site.ini.append.php in the extensions block :

[ExtensionSettings]
ActiveExtensions[]=ezintra
ActiveExtensions[]=ezflow
ActiveExtensions[]=ezwebin
ActiveExtensions[]=ezdhtml
ActiveExtensions[]=ezodf

And set my siteaccess site.ini.append.php design block :

[DesignSettings]
SiteDesign=ezintra
AdditionalSiteDesignList[]
AdditionalSiteDesignList[]=ezflow
AdditionalSiteDesignList[]=ezwebin
AdditionalSiteDesignList[]=base
AdditionalSiteDesignList[]=standard

I tried to put my extension and design declarations before or after ezflow but never managed to get my modified image on my site...

What am I missing ?

Thanks for your help !!!!

"

Kind of funny why no one in this community has bothered to answer. This is a standard thing you’d want to do, and yet there is no guide and no answer.

Frederik Krautwald
Executive Creative Director

Robin Muilwijk

Saturday 13 November 2010 10:00:12 pm

Hello Frederik,

It is too bad to see some questions remained unanswered. This can happen in a community of volunteers.

There are some articles in the "Learn" section that address designs, and also a few forum threads about ini setting overrides, so it should not be too difficult to find your way around on this topic.

@Kevin, if you still need help, do let us know

@Frederik, if you want some specific links to content/doc, also let us know.

Kind regards, Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

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

Main resources:

Total runtime0.9021 sec
Peak memory usage4,096.0000 KB
Database Queries89

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 589.0234152.6250
Module start 'layout' 0.00680.0029 741.648439.4453
Module start 'content' 0.00980.8908 781.0938855.5234
Module end 'content' 0.90050.0015 1,636.617232.1719
Script end 0.9021  1,668.7891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3958160.0002
Check MTime0.00130.1456160.0001
Mysql Total
Database connection0.00070.082910.0007
Mysqli_queries0.782386.7235890.0088
Looping result0.00090.1032870.0000
Template Total0.872596.720.4363
Template load0.00210.232920.0011
Template processing0.870496.483920.4352
Template load and register function0.00010.010710.0001
states
state_id_array0.00080.089310.0008
state_identifier_array0.00070.075820.0003
Override
Cache load0.00210.23771270.0000
Sytem overhead
Fetch class attribute can translate value0.00050.060160.0001
Fetch class attribute name0.00140.1580170.0001
XML
Image XML parsing0.00320.359160.0005
class_abstraction
Instantiating content class attribute0.00010.0065220.0000
General
dbfile0.00180.2013490.0000
String conversion0.00000.000840.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
11content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
11content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
31content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
14content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
8content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 78
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs