Forums / Developer / Extension override.ini matches, is it possible?

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

eZ debug

Timing: Jan 18 2025 21:10:00
Script start
Timing: Jan 18 2025 21:10:00
Module start 'content'
Timing: Jan 18 2025 21:10:02
Module end 'content'
Timing: Jan 18 2025 21:10:02
Script end

Main resources:

Total runtime2.0019 sec
Peak memory usage4,096.0000 KB
Database Queries214

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 587.8438180.8125
Module start 'content' 0.00691.8411 768.6563641.8516
Module end 'content' 1.84800.1538 1,410.5078340.4297
Script end 2.0019  1,750.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.2106210.0002
Check MTime0.00150.0736210.0001
Mysql Total
Database connection0.00090.047210.0009
Mysqli_queries1.910195.41402140.0089
Looping result0.00230.11492120.0000
Template Total1.968498.320.9842
Template load0.00200.097720.0010
Template processing1.966498.225920.9832
Template load and register function0.00010.005910.0001
states
state_id_array0.00110.055610.0011
state_identifier_array0.00250.122620.0012
Override
Cache load0.00170.0863480.0000
Sytem overhead
Fetch class attribute can translate value0.00250.127340.0006
Fetch class attribute name0.00140.0676100.0001
XML
Image XML parsing0.00100.050440.0003
class_abstraction
Instantiating content class attribute0.00000.0015130.0000
General
dbfile0.00470.2363270.0002
String conversion0.00000.000330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs