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.