Forums / Developer / Siteaccess specific template overrides for extensions

Siteaccess specific template overrides for extensions

Author Message

Eirik Alfstad Johansen

Tuesday 23 November 2004 3:14:51 am

Hi,

I'm creating an extension which, among other things, creates a couple of new classes. For these classes, I've created override templates in full and line view, and then created an override.ini.append.php in extension/extname/settings in order for them to be applied, which they are.

The only problem is that the admin siteaccess templates are also overriden. I tried solving the problem by moving the override.ini file to extension/extname/settings/siteaccess/usersiteaccess but then the overrides were ignored alltogether.

Is there any way around this problem? Thanks in advance !

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Lazaro Ferreira

Tuesday 23 November 2004 4:05:25 am

Hi,

We have had a similar problem, that is reported here :

http://ez.no/community/bug_reports/extension_with_settings_override_ini_append_breaks_ezp_override_system

Our workaround was to remove the override.ini.append.php for the extension, and override directly under settings/siteaccess

Lazaro
http://www.mzbusiness.com

Hans Melis

Tuesday 23 November 2004 5:48:26 am

Just an idea here...

It's quite logical that an override.ini.append in an extension is applied to <b>all</b> siteaccesses. The regular way of activating extensions (ActiveExtensions in the global site.ini.append) implies that behaviour.

But what if such an extension is only activated for selected siteaccesses? There is a setting in site.ini:

[ExtensionSettings]
ActiveAccessExtensions[]

If you put that in the site.ini.append of a siteaccess, then the extension is only loaded if that siteaccess is wanted/needed (at least that's how I think it works).

If the extensions is siteaccess specific, all its settings could be siteaccess specific too (the extension's override.ini.append would be added to the siteaccess' override settings).

I've never tried this though, so I'm not sure if this will work or if this is what you need...

Hans
http://blog.hansmelis.be