override template problem

Author Message

Joël LEGER

Monday 18 February 2008 3:16:05 pm

hi,

i have a problem for overriding the content/view/embed.tpl.

I got an XML bloc attribute within an article object list and i try to override the tempalte above withe the override.ini.append.php like this :

[embed_article]
Source=content/view/embed.tpl
MatchFile=embed/article.tpl
Subdir=templates
Match[class_identifier]=article

but it's still generate the standard template ... any ideas

thks

Abdelkader RHOUATI

Monday 18 February 2008 3:40:20 pm

hi,

try to clean cache, if you still have a probleme. it's shurly probleme of location of the template , try to put your costum template article.tpl , in "design/your_site_access/override/embed/article.tpl"

all templates overrided with override.ini.append.php , must be in the override folder.

i hope , your problem will be resolved.

tks.

Abdelkader.

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

Vicente Olivan

Monday 18 February 2008 11:03:56 pm

Hi Jo:

Default, your template it´s on
/extension/ezwebin/design/ezwebin/overrride/templates/embed/article.tpl

You need edit this template for custom or create other.

Grettings

Joël LEGER

Monday 18 February 2008 11:36:31 pm

Thank you Vincente but i don't use ezwebin extension.

Abdelkader, i thought the override templates should be locate in design/your_site_access/<b>override</b>/templates/embed/article.tpl , no ?

I cleaned the cache many times, and my override template location is here :
design/your_site_access/override/templates/embed/article.tpl

but i still get the standard template...
I don't know if it's important but my embeded article is in a folder's XML bloc (short description)

André R.

Tuesday 19 February 2008 1:52:03 am

It should be:
design/your_design/override/templates/embed/article.tpl
Or
extension/your_design_extension/design/your_design/override/templates/embed/article.tpl

Where your_design needs to be activated as highest priority design in both cases.
settings/siteaccess/your_frontend_site/site.ini.append.php:

[DesignSettings]
SiteDesign=your_design
AdditionalSiteDesignList[]
AdditionalSiteDesignList[]=ezwebin
AdditionalSiteDesignList[]=base

(This is for sites that use ezwebin and base as fallback designs, the standard design is still used as last option, this is controlled by 'StandardDesign'. Read more about the settings in settings/*.ini)

In the last case the extension needs to be activated as well!

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

Abdelkader RHOUATI

Tuesday 19 February 2008 3:15:17 am

hi,

"Abdelkader, i thought the override templates should be locate in design/your_site_access/override/templates/embed/article.tpl , no ?"

yeah , i forget the "template". sorry.

tks.

Abdelkader.

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

Joël LEGER

Tuesday 19 February 2008 6:38:55 am

just one information , i don't use ezwebin extension.

So i tried with an another override blocks :

[welcome_page]
Source=node/view/full.tpl
MatchFile=test.tpl
Subdir=templates
Match[node]=2

and it's works...

so may be there is a problem with the condition but i don't think so... i'm little bit stock

Joël LEGER

Tuesday 19 February 2008 6:51:38 am

i did an another test and it's works fine :
[embed_article]
Source=content/view/embed.tpl
MatchFile=embed/article.tpl
Subdir=templates
<b>Match[class]=2</b>

i replaced Match[class_identifier]=article by Match[class]=2 (The id number of the article class).
If someone have an explanation ...

Abdelkader RHOUATI

Tuesday 19 February 2008 1:03:02 pm

hi,

there are two ways to override a template :

1- via the file override.ini.append.php (you try this way, i dont know wath it's wrong...).

2- just create the same template, with the same name, in the same arborescence folder

try the seconde way , delete the code from override.ini

[embed_article]
Source=content/view/embed.tpl
MatchFile=embed/article.tpl
Subdir=templates
Match[class_identifier]=article

end create you costum template : design\your_site_access\override\templates\embed\article.tpl

tks

Abdelkader.

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

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