Help Needed with getting a template over ride to work.

Author Message

Adam Butler

Thursday 02 April 2009 5:42:34 am

Hi

I've been trying to over ride a template for a folder - but no matter what i try nothing works - I have used the gui to create an over ride for a template - this is the current layout and I want to replace

extension/ezwebin/design/ezwebin/override/templates/full/folder.tpl

with my own scheduled_air_carriers_full_listing_ezflow.tpl

This is what I have after creating the folder with some test content

Requested template
node/view/full.tpl

Template
full/folder.tpl

Template loaded
extension/ezwebin/design/ezwebin/override/templates/full/folder.tpl

I have added the following over ride using the wizard

Overrides for </full/folder.tpl> template in <eng> siteaccess [5]
Default template resource:
extension/oagextension/design/ezflow/override/templates

Under the url

I have this over ride in ezpublish\settings\siteaccess\eng\override.ini.append.php

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

with template

ezpublish\extension\ezwebin\design\ezflow\override\templates\scheduled_air_carriers_full_listing_webin.tpl

However when I go to http://testserver/ezpublish/index.php/eng/Scheduled-Air-Carrier-Directory

I still get extension/ezwebin/design/ezwebin/override/templates/full/folder.tpl being displayed and not my over ride. The list of templates used to render the page gives no mention of my over ride and lists start template as node/view/full.tpl which then over riden by full/folder.tpl

if any one can help It would be much apprecaited as I've looked through the documentation and tried various things to try and get this to work and after a day I'm no further forward.
As you can guess I'm new user of ez publish.

Thanks

Adam

Neo Pixel

Friday 03 April 2009 1:39:55 am

I've had the same problem and as a last resort I've edited the actual tpl file within ezwebin and abandoned using the override template.

That's obviously not the way to do things within ezp but needs must.

Can anyone shed some light on this problem?

Thanks in advance :-)

Asking stupid questions so you don't have to!

André R.

Friday 03 April 2009 6:09:43 am

extension/ezwebin/design/ezwebin/override/templates/full/folder.tpl is already an override, you can not override an override using override.ini rules.

There are two choices:
1. placement override, override the above template in all conditions it is used (full view off all folder objects) by copying the template to your own design that has higher priority(see settings/siteaccess/*/site.ini Design settings) AND/OR same design name 'ezwebin' in your own extension that has higher priority(see setting/override/site.ini extension settings).

2. override.ini override, if you want just a specific node(or some other specific rule) to use another template then folder template, then add an override rule that looks like this:

[full_frontpage]
Source=node/view/full.tpl
MatchFile=full/root_node_2.tpl
Subdir=templates
Match[node]=2

Notice the Source, if you enable debug output and [TemplateSettings]ShowUsedTemplates=enabled (both in site.ini) it will be a lot easier to understand and debug.

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.