Forums / Developer / Template not found

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!)

eZ debug

Timing: Jan 18 2025 19:33:30
Script start
Timing: Jan 18 2025 19:33:30
Module start 'content'
Timing: Jan 18 2025 19:33:31
Module end 'content'
Timing: Jan 18 2025 19:33:32
Script end

Main resources:

Total runtime1.3909 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 588.7266180.8438
Module start 'content' 0.00671.2514 769.5703615.2813
Module end 'content' 1.25800.1328 1,384.8516338.0078
Script end 1.3908  1,722.8594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.3060210.0002
Check MTime0.00150.1106210.0001
Mysql Total
Database connection0.00070.053810.0007
Mysqli_queries1.315394.56502020.0065
Looping result0.00210.14822000.0000
Template Total1.346796.820.6734
Template load0.00210.150120.0010
Template processing1.344696.674020.6723
Template load and register function0.00020.015710.0002
states
state_id_array0.00220.154810.0022
state_identifier_array0.00150.108820.0008
Override
Cache load0.00180.1326470.0000
Sytem overhead
Fetch class attribute can translate value0.00120.082740.0003
Fetch class attribute name0.00120.085070.0002
XML
Image XML parsing0.00140.101740.0004
class_abstraction
Instantiating content class attribute0.00000.000970.0000
General
dbfile0.00180.1284340.0001
String conversion0.00000.001830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 33
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs