Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

layout

Summary

Provides a view that makes it possible to use alternative pagelayouts.

Description

This module has only one view, "set". The view can be used to force the system to make use of a different pagelayout template than the default one (pagelayout.tpl). It simply takes care of setting the variable that eZ publish uses when picking out the pagelayout template file.

When finished, the module that is specified (after the layout part in the URL) will be executed. In other words, the layout module offers a prefix/prerun-mechanism that can be used to specify which pagelayout eZ publish should use when rendering a specific page. For example, it can be used to set the printer-friendly layout:

http://www.example.com/layout/set/print/content/view/full/45

Note that the URL actually contains two module-view pairs. The first module/view combination will make sure that the print pagelayout is used, the second module/view combination instructs eZ publish to display a full view of node number 45. The result will be the following: eZ publish will render the full view of node number 45, but instead of using "pagelayout.tpl" as the main template, it will use the pagelayout that is associated with "print" in the configuration override for "layout.ini".

Fetch functions

NameSummary
sitedesign_list DEPRECATED (Fetches the names of the currently used designs.)

Views

NameSummary
set Forces the system to use an alternate pagelayout.

Balazs Halasy (23/02/2005 9:51 am)

Balazs Halasy (29/04/2005 7:59 am)


Comments

  • Redirect layout in example for Printer friendly output

    In other words using http://www.example.com/layout/set/print/content/view/full/45
    ez searche for the [print] instruction in layout.ini following the usual cascading rules and outputs the content using the PageLayout=xxx.tpl template that ist defined there.

    By the way, the default layout.ini defines following alternatives:

    [fullscreen]
    PageLayout=fullscreen_pagelayout.tpl

    [popup]
    PageLayout=popup_pagelayout.tpl

    [print]
    PageLayout=print_pagelayout.tpl

    As soon as I found out how this affects the the gui_views I add an other comment or write an short article
  • As promised

    I worked it through

    You can use your own print templates by changing the view full to your own view (say print)

    http://www.example.com/layout/set/print/content/view/print/45
    


    the tpl file will be searched in the node/view/ template directory of your design

    In this case:
    /node/view/print.tpl
    


    After that the usul override rules apply
    i.e.

    [print_frontpage]
    Source=node/view/print.tpl
    MatchFile=print/frontpage.tpl
    Subdir=templates
    Match[class_identifier]=frontpage