Considerations about the override-logic for ini-files

Author Message

Volker Lenz

Friday 06 June 2003 4:24:28 am

I wonder how the overriding of ini-files actually works. Two override-modes seem possible and I feel they both could lead to inconsistencies in the effective ini-settings (ini + ini.append)

1. REPLACE-MODE: This would mean that e.g. if you define new array values for site access, the complete site access array is overwritten. (Fine for key-less arrays, not so fine for other settings you simply do not want to change). In "pure" replace-mode, you would have to keep -ALL- settings in your ini.append.file.

2. UPDATE-MODE: In this override-behaviour, new array values for e.g. site access would be appended to the existing values (since there are no array keys to match against). So "pure" update mode is not fine for array-configuration like host maps or site access, but it does not require to keep unchanged ini-values in override-files.

I am looking forward to comments clarifying this.

Regards

Volker

Paul Borgermans

Monday 09 June 2003 2:37:07 am

>1. REPLACE-MODE: This would mean that e.g. if you define new array
>values for site access, the complete site access array is overwritten. (Fine
>for key-less arrays, not so fine for other settings you simply do not want to
>change). In "pure" replace-mode, you would have to keep -ALL- settings in
>your ini.append.file.

But "pure replace mode" would mean the use of eg site.ini, not site.ini.append

This is IMHO not the way to use the ini files. Best is to use the update mode to only specify what's really specific for your site/siteaccess.

You can use the update mode also easily for replacing entire arrays by first resetting an array, eg

Rules[] ###reset the array
Rules[]=Access;enable
Rules[]=ModuleAll;true
Rules[]=Access;disable
Rules[]=Module;sdk

hth

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Gabriel Ambuehl

Monday 09 June 2003 4:11:18 am

Did anyone actually get template overriding to work in 3.1?

I have a Link class (id 11) that I'd like to have new line tpl for my siteaccess (which is called regular). The template file is called line_link.tpl

So I create settings/siteaccess/regular/override.ini.append with the following content:

[line_link]
Source=node/view/line.tpl
MatchFile=line_link.tpl
Subdir=templates
Match[class]=11

but upon loading the folder that contains all links, I still see the normal line template loaded from design/regular/templates/node/view/link.tpl.

Caching is from all I can tell disabled:
EnableCaching=false
TranslationCache=disabled
NodeTreeCaching=disabled
ViewCaching=disabled
CachedViewMode=

What am I missing?

Visit http://triligon.org

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

Main resources:

Total runtime0.6779 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 589.5938152.6563
Module start 'layout' 0.00610.0098 742.250039.5234
Module start 'content' 0.01580.6606 781.7734584.0469
Module end 'content' 0.67640.0014 1,365.820312.4219
Script end 0.6778  1,378.2422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.5230160.0002
Check MTime0.00150.2163160.0001
Mysql Total
Database connection0.00080.113710.0008
Mysqli_queries0.613890.5517590.0104
Looping result0.00070.1090570.0000
Template Total0.637694.120.3188
Template load0.00200.288320.0010
Template processing0.635693.766520.3178
Template load and register function0.00010.016110.0001
states
state_id_array0.00120.169710.0012
state_identifier_array0.00100.150220.0005
Override
Cache load0.00170.2516440.0000
Sytem overhead
Fetch class attribute can translate value0.00150.221830.0005
Fetch class attribute name0.00210.308350.0004
XML
Image XML parsing0.00130.185330.0004
class_abstraction
Instantiating content class attribute0.00000.001750.0000
General
dbfile0.00100.1490230.0000
String conversion0.00000.001440.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/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: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs