Multiple Views

Any page can have multiple views, by using the pkit_view request parameter. One example is Printable pages. Another is having the same web site branded differently for different companies. Another is having different Media outputs such as HTML, XML and WML, by using the content_type configuration options.

To create a new view, create a View/pkit_view directory and place the PageKit Templates and XSLT files for the pages and components that you wish to apply the view to. Note that if PageKit doesn't find a template or XSLT file in the View/pkit_view directory it looks in the View/Default directory. That is, the files View/pkit_view "override" the files in View/Default directory.

To association a media output such as XML, WML, or PDF with a view, use the View content_type attribute. Note that in order for PDF output to work, you must install the Apache XML FOP processor, available from, and configure fop_command to point to the FOP processor.

You may set the pkit_view request parameter in the request URI or by using $model->input(pkit_view => pkit_view); in your model code.