Template override, match criterias

Author Message

Heiko Irrgang

Wednesday 29 December 2010 2:40:38 am

Hi,

i want to override the main template only for a certain view of a certain module.

The override in general works, if i add no Match criteria to the override.ini, it works, but of course for the whole page, which i don't want.

What i want to have is, that the override only takes place under the url http://mysite/mymodule/myview/some/params

I tried some of the reference docs template overrides, like Match[navigation_part_identifier] or Match[url_alias], but i didn't get it to work.

Are these parameters documented somewhere (...as in: more than the ref doc's 'they exist')?

How could i achieve this?

Greetings,

Heiko

Carlos Revillo

Wednesday 29 December 2010 6:24:52 am

Hi.

I suppose you have a script called myview.php for your "myview"? Then in that script you can just use

$Result['pagelayout'] = 'yourpagelayout.tpl';

Heiko Irrgang

Wednesday 29 December 2010 7:09:42 am

Thank you very much, exactly what i needed.

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 30 2025 19:32:26
Script start
Timing: Jan 30 2025 19:32:26
Module start 'layout'
Timing: Jan 30 2025 19:32:26
Module start 'content'
Timing: Jan 30 2025 19:32:26
Module end 'content'
Timing: Jan 30 2025 19:32:26
Script end

Main resources:

Total runtime0.0256 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.0054 588.1406151.2109
Module start 'layout' 0.00540.0052 739.3516220.7109
Module start 'content' 0.01050.0134 960.0625997.7422
Module end 'content' 0.02390.0017 1,957.804729.9766
Script end 0.0256  1,987.7813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002911.4959140.0002
Check MTime0.00124.8030140.0001
Mysql Total
Database connection0.00062.391210.0006
Mysqli_queries0.003011.769330.0010
Looping result0.00000.058610.0000
Template Total0.00124.810.0012
Template load0.00093.592910.0009
Template processing0.00031.185910.0003
Override
Cache load0.00052.126210.0005
General
dbfile0.00093.592080.0001
String conversion0.00000.034440.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