Overriding an extension datatype tpl

Author Message

Paul Forsyth

Wednesday 03 September 2003 2:43:33 pm

I have an extension with a module, datatype and design directory. The design directory contains the edit,view tpl files for the datatype. The path, as expected, is:

extension/mymodule/design/standard/templates/content/datatype/view/mydatatype.tpl
extension/mymodule/design/standard/templates/content/datatype/edit/mydatatype.tpl

I thought i could override this file in the normal manner, so in my override file I have:

[new_datatype_view]
Source=content/datatype/view/mydatatype.tpl
MatchFile=content/datatype/view/mydatatype.tpl
Subdir=templates

With the new tpl located at:

design/user/templates/content/datatype/view/mydatatype.tpl

but this doesnt work.

Checking the templates section within the admin shows me that the override is there but that the original view .tpl is actually overriding itself, and not the expected tpl. This of course means i cannot view my datatype with my new code.

Has anyone else seen this?

Paul

Hans Melis

Thursday 04 September 2003 7:46:48 am

Hi Paul,

I'm just taking a guess here, but what happens when you put the new tpl in:

extension/mymodule/design/user/....

If that doesn't work, try putting it in the override/templates of the design and clear the override cache.

--
Hans

Hans
http://blog.hansmelis.be

Paul Forsyth

Thursday 04 September 2003 8:06:58 am

Thanks Hans,

Getting closer...

The admin interface now recognises the new override when i put the file into 'extension/design/user/...' but it fails to override when i try to view. Cache is clear. Even having the file back in 'design/user' doesn't work.

Im wondering if it has something to do with the wrong resource being used. For other regular overrides the resource is:

"Default template resource design/user/override/templates"

While my extension override has this resource:

"Default template resource extension/mymodule/design/user/override/templates"

I am not finding any errors from this.

Ez, can you comment?

Paul

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 19:19:00
Script start
Timing: Jan 18 2025 19:19:00
Module start 'layout'
Timing: Jan 18 2025 19:19:00
Module start 'content'
Timing: Jan 18 2025 19:19:01
Module end 'content'
Timing: Jan 18 2025 19:19:01
Script end

Main resources:

Total runtime1.0675 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 587.9375152.6250
Module start 'layout' 0.00510.0026 740.562539.4453
Module start 'content' 0.00771.0578 780.0078533.2188
Module end 'content' 1.06560.0017 1,313.226612.1563
Script end 1.0673  1,325.3828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3303160.0002
Check MTime0.00150.1432160.0001
Mysql Total
Database connection0.00070.061410.0007
Mysqli_queries1.013494.9310570.0178
Looping result0.00050.0468550.0000
Template Total1.037697.220.5188
Template load0.00230.213020.0011
Template processing1.035396.981520.5176
Template load and register function0.00020.016410.0002
states
state_id_array0.00110.101410.0011
state_identifier_array0.00140.127120.0007
Override
Cache load0.00190.1788370.0001
Sytem overhead
Fetch class attribute can translate value0.00090.083720.0004
Fetch class attribute name0.00140.126940.0003
XML
Image XML parsing0.00050.047420.0003
class_abstraction
Instantiating content class attribute0.00000.004240.0000
General
dbfile0.00080.0739150.0001
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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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: 6

Time used to render debug report: 0.0001 secs