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.

eZ debug

Timing: Jan 31 2025 00:41:26
Script start
Timing: Jan 31 2025 00:41:26
Module start 'layout'
Timing: Jan 31 2025 00:41:26
Module start 'content'
Timing: Jan 31 2025 00:41:26
Module end 'content'
Timing: Jan 31 2025 00:41:26
Script end

Main resources:

Total runtime0.0221 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.1328151.2109
Module start 'layout' 0.00500.0036 739.3438220.6875
Module start 'content' 0.00860.0121 960.03131,009.9141
Module end 'content' 0.02060.0014 1,969.945341.9922
Script end 0.0220  2,011.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002611.8371140.0002
Check MTime0.00104.7508140.0001
Mysql Total
Database connection0.00072.965510.0007
Mysqli_queries0.002410.947730.0008
Looping result0.00000.054010.0000
Template Total0.00104.610.0010
Template load0.00083.612810.0008
Template processing0.00020.929410.0002
Override
Cache load0.00052.393810.0005
General
dbfile0.00104.403980.0001
String conversion0.00000.033540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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