Problem overriding template filtering by class_identifier

Author Message

Toni Vila

Wednesday 24 May 2006 9:55:18 am

Hi i’m running ez 3.6.x,

I want to use tipafriend functionality but using different template depending on object class.
I’ve been created an override for template tipafriendmail.tpl:

[tipafriend_news]
Source=content/tipafriend_mail.tpl
MatchFile= tipafriend_mail_news.tpl
Subdir=templates
Match[class_identifier]=news

And it works.
The problem is when I try to add override filters by class:

[tipafriend_news]
Source=content/tipafriendmail.tpl
MatchFile= tipafriend_mail_news.tpl
Subdir=templates
Match[class_identifier]=news

It doesn’t use template tipafriend_mail_news in design/<i>mysite</i>/override/templates/tipafriendmail.tpl and uses template in design/standard/templates/content/tipafriendmail.tpl

Anyone found a problem like this?

Many thanks in advance.

Łukasz Serwatka

Thursday 25 May 2006 11:26:19 pm

Toni, hello and welcome to the eZ publish Community!

Unfortunately override base on class match will not work with this module. Script fetches data from tipafriend_mail.tpl and uses it in the mail body. When user access tipafirend module, system does not know which class or section is used so match will fail. You can use general override rule without matches.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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 07:34:06
Script start
Timing: Jan 31 2025 07:34:06
Module start 'layout'
Timing: Jan 31 2025 07:34:06
Module start 'content'
Timing: Jan 31 2025 07:34:06
Module end 'content'
Timing: Jan 31 2025 07:34:06
Script end

Main resources:

Total runtime0.0212 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 588.3984151.2422
Module start 'layout' 0.00720.0047 739.640636.7109
Module start 'content' 0.01190.0075 776.351690.3438
Module end 'content' 0.01940.0017 866.695329.9922
Script end 0.0211  896.6875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002612.2093140.0002
Check MTime0.00125.4457140.0001
Mysql Total
Database connection0.00136.056210.0013
Mysqli_queries0.004220.049630.0014
Looping result0.00000.170110.0000
Template Total0.00136.310.0013
Template load0.00104.828510.0010
Template processing0.00031.455210.0003
Override
Cache load0.00063.005010.0006
General
dbfile0.002511.889480.0003
String conversion0.00000.051840.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