Template not found

Author Message

Roberto Sacchi

Thursday 19 February 2009 6:29:56 pm

I've extended a frontpage class, naming it frontpage2.

I've create an extension, in which I would put the frontpage2.tpl.

In override.ini.append.php I've written:

[frontpage2]
Source=node/view/full.tpl
MatchFile=frontpage2.tpl
Subdir=templates
Match[class_identifier]=frontpage2

and I've put my tpl in myext/design/templates/frontpage2.tpl.

When I try to load a frontpage2 object, ez cannot find my template.
Here's where it searches:

extension/ezflow/design/ezflow/override/templates/frontpage2.tpl, 
extension/ezflow/design/standard/override/templates/frontpage2.tpl, 

extension/ezwebin/design/ezwebin/override/templates/frontpage2.tpl, 

extension/ezdhtml/design/standard/override/templates/frontpage2.tpl, 
extension/ezodf/design/standard/override/templates/frontpage2.tpl, 

extension/ezodf/design/standard/override/templates/frontpage2.tpl,

design/standard/override/templates/frontpage2.tpl, 

design/base/override/templates/frontpage2.tpl,

It doesn't search in my extension folder. :(
Here's my design.ini.php.append in my extension:

<?php /* #?ini charset="utf-8"?
# transmit to eZ, to search for designs in myext
[ExtensionSettings]
DesignExtensions[]= myext

*/ ?>

Any ideas?

justin kazadi

Thursday 19 February 2009 11:47:05 pm

Hi Roberto Sacchi

you said that:


... and I've put my tpl in myext/design/templates/frontpage2.tpl.

i think it is because your override template is not in the override folder of your extension.

you must store it in:

myext/design/override/frontpage2.tpl.

regards,

The theory is when we know everything and nothing works.
The practice is when everything works and nobody knows why.
If the practice and theory are met, nothing works and we do not know why.

Albert Einstein

André R.

Friday 20 February 2009 5:17:49 am

Some issues:
* There is a whitespace in your DesignExtensions[]= myext setting.
* You need to place it in override folder like justin mentions, something like extension/myext/design/mydesign/override/templates/frontpage2.tpl

You can also reuse the ezflow design name instead of 'mydesign', if you make sure that your extension have a higher priority then ezflow in the ActiveExtension setting in site.ini.

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

Roberto Sacchi

Saturday 21 February 2009 5:34:19 pm

Thanks guys.
I cancel the blank space and I put the file in:

myext\design\ezwebin\override\templates\frontpage2.tpl

and it works when I load a frontapge2 object.

But I still have a great problem.
Now when I try to access to frontpage2 object by admin panel, nothing appears

Maybe the override rule works also in admin access, but the text in frontpage2.tpl is not present.

Any ideas?

Roberto Sacchi

Saturday 21 February 2009 5:42:52 pm

I try to put override.ini in myext/settings/siteaccess/ita/ and now admin interface works.

The problem is that now my override is limited to only one siteaccess ("ita" in my exemple).
I would like to make it more generic (all siteaccess except site_admin will be great!)

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

Main resources:

Total runtime1.2583 sec
Peak memory usage8,192.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 588.0156151.1953
Module start 'layout' 0.00460.0039 739.2109220.6719
Module start 'content' 0.00861.2488 959.88284,517.6797
Module end 'content' 1.25730.0009 5,477.562516.5000
Script end 1.2582  5,494.0625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2491160.0002
Check MTime0.00120.0922160.0001
Mysql Total
Database connection0.00080.061810.0008
Mysqli_queries1.160292.2081650.0178
Looping result0.00070.0558630.0000
Template Total1.211696.320.6058
Template load0.00180.139920.0009
Template processing1.209896.147920.6049
Template load and register function0.00190.151310.0019
states
state_id_array0.00120.094710.0012
state_identifier_array0.00190.150120.0009
Override
Cache load0.00150.1196470.0000
Sytem overhead
Fetch class attribute can translate value0.00190.152030.0006
Fetch class attribute name0.00280.223270.0004
XML
Image XML parsing0.00460.365130.0015
class_abstraction
Instantiating content class attribute0.00000.001170.0000
General
dbfile0.00620.4910230.0003
String conversion0.00000.000540.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/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: 33
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs