Override conditions for ezxml datatypes

Author Message

Christian Johansen

Wednesday 14 March 2007 2:57:21 am

I read from the documentation that content/datatype/view/*.tpl can be overridden with the class_identifier condition, so I tried:

[content_embed_image]
Source=content/datatype/view/ezxmltags/embed.tpl
MatchFile=content/datatype/view/ezxmltags/embed/image.tpl
Match[class_identifier]=image
Subdir=templates

No such luck! Did I interpret it wrong? If I remove the class_identifier condition, the override works, but for all embedded objects. If I display $object.class_identifier in this template, it clearly says 'image'. Did I misunderstand something?

Claudia Kosny

Wednesday 14 March 2007 3:34:47 pm

Hi Christian

I am not 100% sure but I think that the class_identifier means the class the contains the XML block which is viewed using this template. The class_identifier of the embedded object does not matter.

Claudia

Xavier Serna

Thursday 15 March 2007 9:05:51 am

I believe that you have problems with the path used in your override rule. Yo have to be sure that the actual tpl you want to use is in <your_design>/override/templates and then inside the path you put into your override definition.

This is an example of an override rule we use in one of our sites for embedded images:

Source=content/view/embed.tpl
MatchFile=embed/image.tpl
Subdir=templates
Match[class_identifier]=image

and works fine!
If you can get this working, enable debugoutput and showusedtemplates to view what templates are actually used, this can help a lot!

hth,

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

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 10:20:30
Script start
Timing: Jan 18 2025 10:20:30
Module start 'layout'
Timing: Jan 18 2025 10:20:30
Module start 'content'
Timing: Jan 18 2025 10:20:31
Module end 'content'
Timing: Jan 18 2025 10:20:31
Script end

Main resources:

Total runtime0.6956 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0080 589.4844152.6406
Module start 'layout' 0.00800.0037 742.125039.4766
Module start 'content' 0.01170.6821 781.6016566.9531
Module end 'content' 0.69370.0018 1,348.554712.1406
Script end 0.6956  1,360.6953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.5188160.0002
Check MTime0.00140.2076160.0001
Mysql Total
Database connection0.00130.191910.0013
Mysqli_queries0.641092.1539590.0109
Looping result0.00070.1077570.0000
Template Total0.659894.820.3299
Template load0.00220.309220.0011
Template processing0.657694.534520.3288
Template load and register function0.00010.018910.0001
states
state_id_array0.00100.138810.0010
state_identifier_array0.00070.104420.0004
Override
Cache load0.00180.2545180.0001
Sytem overhead
Fetch class attribute can translate value0.00070.107130.0002
Fetch class attribute name0.00190.268740.0005
XML
Image XML parsing0.00310.451030.0010
class_abstraction
Instantiating content class attribute0.00000.002240.0000
General
dbfile0.00350.5090160.0002
String conversion0.00000.001640.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs