Forums / Setup & design / cannot include overridden folder.tpl in template.

cannot include overridden folder.tpl in template.

Author Message

M Unicorn

Wednesday 27 May 2009 8:08:21 am

The basic idea is to override a specific node's folder template and implement a sort_order parameter, then include the default folder code ie. {include uri="design:full/folder.tpl}. This way I don't have to duplicate the full folder template for small code changes. btw, my overridden folder.tpl is in "design/sitedesign/override/templates/full/folder.tpl (and works great if called as a folder directly).

A bit more specific, the override.ini.append.php has this entry:

[FULL_folder_events]
Source=node/view/full.tpl
MatchFile=full/events_folder.tpl
Subdir=templates
Match[node]=100

And I have a template the rule matched above, the rule is working and pulling the right template, events_folder.tpl which is basically this:

{include uri="design:/full/folder.tpl"}

I keep getting:
Warning: eZTemplate May 27 2009 15:05:32
No template could be loaded for "full/folder.tpl" using resource "design"

I've tried many variations of the path starting from /design right down to trying to call folder.tpl with no path. I've also tried using "full/folder.tpl"|ezdesign('no') and various paths with no luck.

I'm wondering if the override is overriding the overridden folder.tpl? Say that 10 times fast!

Any help is appreciated
M Unicorn.

Norbert Wagner

Friday 05 June 2009 4:04:42 pm

Hi M Unicorn,
we had similar problems.

It seems that you cannot include templates located in the override/templates folder.
IIRC, in the past this was possible.

We solved our problem with a dumb override which in your case should look like this:

[dummy_folder]
Source=full/folder.tpl
MatchFile=full/folder.tpl
Subdir=templates

Although we did not use it for class templates, but for menus included in the pagelayout.

Hope this helps,
Norbert

Russell Michell

Sunday 07 June 2009 4:04:53 pm

@M Unicorn,

Are you *sure* the right template is being included?

FWIW - while developing, in override/settings.ini.append.php, I usually use ez with the [TemplateSettings] DevelopmentMode=enabled setting which - where viewing the source for a page - ez will show you HTML comments of the *exact* path where a particular template is being included from:


<!-- START: including template: extension/ezdeploy/design/duty/templates/link.tpl (design:link.tpl) -->
<!-- some HTML code here from extension/ezdeploy/design/duty/templates/link.tpl
<!-- STOP: including template: extension/ezdeploy/design/duty/templates/link.tpl (design:link.tpl) -->

Simply seeing "{include uri="design:/full/folder.tpl"}" is not a precise way of ensuring you know where a template is included from especially in the case of overrides, design extensions etc.

Forgive me if you knew this already, Grandma eggs etc ;-)

Cheers,
Russell

Russell Michell, Wellington, New Zealand.
We're building! http://www.theruss.com/blog/
I'm on Twitter: http://twitter.com/therussdotcom

Believe nothing, consider everything.

Norbert Wagner

Thursday 26 November 2009 4:20:49 am

Read link below for more info:

http://ez.no/doc/ez_publish/technical_manual/4_x/reference/template_functions/miscellaneous/include#comment20195

eZ debug

Timing: Jan 18 2025 04:53:55
Script start
Timing: Jan 18 2025 04:53:55
Module start 'content'
Timing: Jan 18 2025 04:53:55
Module end 'content'
Timing: Jan 18 2025 04:53:55
Script end

Main resources:

Total runtime0.1417 sec
Peak memory usage4,096.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.8594180.8125
Module start 'content' 0.00540.0074 768.671998.1484
Module end 'content' 0.01280.1288 866.8203527.8750
Script end 0.1416  1,394.6953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00362.5368200.0002
Check MTime0.00140.9673200.0001
Mysql Total
Database connection0.00070.461010.0007
Mysqli_queries0.094266.46981410.0007
Looping result0.00120.84161390.0000
Template Total0.128490.610.1284
Template load0.00090.657910.0009
Template processing0.127489.957710.1274
Override
Cache load0.00070.466710.0007
Sytem overhead
Fetch class attribute can translate value0.00070.482010.0007
XML
Image XML parsing0.00020.173710.0002
General
dbfile0.00815.7281200.0004
String conversion0.00000.003530.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs