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.