override a page layout in a module section

Author Message

François Xavier Lacroix

Monday 03 October 2005 4:06:08 am

I have made a module named XXX with a template overview like in the tutorial;
my probleme is that i need to override the page layout in this template.
I have put in the first place of override.ini.append in my good site access,

[XXXPagelayout]
Source=pagelayout.tpl
MatchFile=newsletter_layout.tpl
Subdir=templates
Match[url_alias]=XXX/overview

But it does not seem to work.
More over i do not have any node_id in this template.
If somebody deal with that, thx in advance...

Kristof Coomans

Monday 03 October 2005 4:53:04 am

In the view of your module, you will need to make an instance of eZTemplateDesignResource and call it's method setKeys.

For an example, look at kernel/content/view.php.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

François Xavier Lacroix

Wednesday 05 October 2005 8:03:19 am

I m not sure that i have greatly understood ... i have checked ernel/content/view.php;
With

$res =& eZTemplateDesignResource::instance();
$keys =& $res->keys();

I can change key['layout'] and by the way, changing the page_layout of my module ?

François Xavier Lacroix

Wednesday 05 October 2005 8:20:07 am

oups i think i find it here
http://ez.no/community/bugs/extension_with_settings_override_ini_append_breaks_ezp_override_system/template_overriding

1. settings/override.ini - the main overrides (we don't recomend to change these settings).
2. settings/siteaccess/<your_siteaccess>/override.ini.append.php - current siteaccess overrides.
[[[[3. extension/<your_extension>/settings/override.ini.appens.php - extension overrides.]]]]
4. settings/override/override.ini.append.php - global overrides.

Kristof Coomans

Thursday 06 October 2005 7:03:14 am

In the view of your module, you need to define the keys for the Match[] setting of your override group.

In <i>kernel/content/view.php</i>, the keys are class, class_identifier etc., which you can use with Match[] in override.ini.append.

Search kernel/content/view.php for "$res->setKeys", and you will find what you are looking for.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.