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