Module Pagelayout

Author Message

Håkan Bergman

Tuesday 18 May 2010 5:05:45 am

Hello,

I have made an extension that calls a template file and it works correctly. I am using colorbox to call my extension like this: /extension/node_id. The colorbox works fine and the template is loading, but I just want the template to load, not the pagelayout itself.

I tried to search for it and also looked at kernel/content/view.php but didn't really see how I could affect the pagelayout. First I tried an override in /siteaccess/page_site in override.ini.append.php with this:

[extension_name]

Source=pagelayout.tpl

MatchFile=extension_name_pagelayout.tpl

Subdir=templates

That code killed the main pagelayout, so I thought I could move it to /extensions/extension_name/settings/override.ini.append.php. But I got the same default behaviour, ie an empty pagelayout on default main site. I need a hint to where I can find more information about how to manipulate pagelayouts inside the PHP-code.

Gaetano Giunta

Tuesday 18 May 2010 5:17:10 am

The override you set up is used globally, as there is no 'criteria' that tells eZ when it has to be applied.

If you want to change the pagelayout used in an ezp module/view, you can use the override conditions defined here: http://ez.no/doc/ez_publish/technical_manual/4_x/reference/template_override_conditions

If it's a custom view, you can define the pagelayout used in $Results, eg:

$Result['pagelayout'] = 'xml_pagelayout.tpl';

Principal Consultant International Business
Member of the Community Project Board

Håkan Bergman

Tuesday 18 May 2010 9:23:13 am

Hi Gaetano,

Thanks for your information.

As I want a custom pagelayout (stripped to my needs for a custom JS-box) then $Result['pagelayout'] = 'template.tpl' did the trick. Thanks a lot. I didn't find any information about $Result[] and when I looked in other files all I found was $Result['content'] to load the template I needed.

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