eZ Community » Forums » Developer » Use custom pagelayout in a module
expandshrink

Use custom pagelayout in a module

Use custom pagelayout in a module

Wednesday 16 November 2011 12:03:40 pm - 8 replies

Hi there,

I would like to know if it is possible to force eZ to use a custom pagelayout in a module view.

I have my general standard pagelayout who is perfect for all pages but I have to display a map in fullscreen.

So I would like to force the use of a custom pagelayout from within the PHP code.

I know that it is possible to force pagelayout using URL parameters, but I prefer not to use it (bad for SEO I think, and I wish to keep pretty URLs).

Is it possible ?

Wednesday 16 November 2011 12:08:07 pm

Hi,

It is possible, we are planning to release a blog post about it soonish blunk.gif Emoticon

Wednesday 16 November 2011 12:21:26 pm

Hi,

It is possible, we are planning to release a blog post about it soonish blunk.gif Emoticon

Thank you very much Ivo!

Wednesday 16 November 2011 12:48:10 pm

hi,

what about returning this in your module:

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

Cheers

Wednesday 16 November 2011 2:32:14 pm

hi,

what about returning this in your module:

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

Cheers

You're right !

Thank you very much ! This is terribly usefull blunk.gif Emoticon

Wednesday 16 November 2011 3:11:56 pm

hi,

what about returning this in your module:

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

Cheers

But this solution change kernel file and this isn't good when update ez publish.

Wednesday 16 November 2011 3:24:08 pm

hi,

i guess, he wants to override the pagelayout in a custom module view. so, this would be the right way.

Wednesday 16 November 2011 3:29:52 pm

hi,

i guess, he wants to override the pagelayout in a custom module view. so, this would be the right way.

Hi Juan,
I think he want "to use a custom pagelayout in a module view".

Generic module view, not custom.

The best solution is add a template condition in override system.

Can we add it on roadmap?

Bye 

Wednesday 16 November 2011 4:22:00 pm

hi,

you are right domenico,

to override the system pagelayout, you need to define it in the override.ini:

http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Template-override-conditions/pagelayout.tpl

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu