Extension override.ini matches, is it possible?

Author Message

Tony Wood

Saturday 09 August 2003 6:29:06 am

Hi,

I am writing an extension and need a different pagelayout for the extension file.
Normally i would set the following that grabs the pagelayout based on a matching criteria, in this case the section.

[new_pagelayout]
Source=pagelayout.tpl
MatchFile=new_pagelayout.tpl
Subdir=templates
Match[section]=3

Unfortunately i have not match criteria for my extension, any ideas? Is it possible?

Can i code an extension to look like a section? if so i could use section match.

tia

Tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Selmah Maxim

Saturday 09 August 2003 7:06:31 am

I was trying with this way :

extenstion/mymodule/settings/siteaccess/admin/override/

The Ezoverride code is checking this folder as i saw it ezoverride.php, but still not working with me !

Tony Wood

Saturday 09 August 2003 7:21:29 am

I know i added some debug info to eZTemplateDesignResource and it finds the templates, but i think they may not be able to be matched as the code is not there for extensions... I really hope i am wrong.

Tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Selmah Maxim

Saturday 09 August 2003 7:25:23 am

anther thing also ...
I was tryung to match[class]=15 for line.tpl .. but the problem was is not matching it even by [node] .. and the probelem was that override path was the same for the overrided template ...
so I changed to override/template/node/viewx/line.tpl .. and the match[class] work fine ... you may try to but the MatchFile in sub filder. . maybe this the mistake !

Selmah Maxim

Saturday 09 August 2003 7:26:21 am

btw .. am overriding almost the whole admin templates to extentions design !

Tony Wood

Saturday 09 August 2003 7:44:48 am

are you overriding pagelayout.tpl or just the classes?

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Selmah Maxim

Saturday 09 August 2003 8:08:46 am

now I don`t override 'pagelayout.tpl' .. but almost every thing, classes and editing and viewing .

Paul Forsyth

Monday 11 August 2003 6:38:07 am

In the end we found that putting in a line at the end of the module view like this:

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

works.

'pagelayout_mylayout.tpl' overrides the default 'pagelayout.tpl' in our override file just as we expect.

ez, is this correct behaviour for a module extension? do we need to declare which layout we want? Maybe there should be more documentation stating what effect the $Result value has on the template.

paul

Tony Wood

Monday 11 August 2003 8:05:13 am

I'll second that Paul, and good eye for spotting it, I couldn't find it until you showed me. If more people are to produce modules then the basics needs to be documented like
$Result['pagelayout'] etc.

To start with just the syntax and a brief overview will be enough and a tutorial module that had examples, very much like the useful "demo" site.

I think more people would delve into Modules if this was available.

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

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 19 2025 00:10:05
Script start
Timing: Jan 19 2025 00:10:05
Module start 'layout'
Timing: Jan 19 2025 00:10:05
Module start 'content'
Timing: Jan 19 2025 00:10:06
Module end 'content'
Timing: Jan 19 2025 00:10:06
Script end

Main resources:

Total runtime0.7816 sec
Peak memory usage4,096.0000 KB
Database Queries77

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 588.0469152.6406
Module start 'layout' 0.00470.0023 740.687539.4766
Module start 'content' 0.00700.7731 780.1641636.7578
Module end 'content' 0.78010.0015 1,416.921920.1250
Script end 0.7815  1,437.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4044160.0002
Check MTime0.00130.1616160.0001
Mysql Total
Database connection0.00070.094810.0007
Mysqli_queries0.706590.3899770.0092
Looping result0.00120.1496750.0000
Template Total0.756196.720.3780
Template load0.00210.268020.0010
Template processing0.753996.463920.3770
Template load and register function0.00010.014310.0001
states
state_id_array0.00030.036410.0003
state_identifier_array0.00070.089620.0004
Override
Cache load0.00180.2356480.0000
Sytem overhead
Fetch class attribute can translate value0.00170.222130.0006
Fetch class attribute name0.00650.8374100.0007
XML
Image XML parsing0.00070.088030.0002
class_abstraction
Instantiating content class attribute0.00000.0043130.0000
General
dbfile0.00080.1010160.0000
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs