Advanced

Advanced topics

 

Generator: GetHeader

Class name:org.weborganic.bastille.web.GetHeader
Version:0.6.5 - 25 May 2010
Library:Bastille
Cacheable:Yes
Generated:2012-12-21

Description

This generator returns the XML for the Header.

Deprecation warning!

This generator as been deprecated in Bastille 0.8.0. To achieve a similar functionality use GetConfigFile instead.

Configuration

The header is defined at the PageSeeder level using the website properties. When the website is published the path to the file to use for the header is stored in /WEB-INF/conf/template-config.prp as the header property.

There is no reason to modify this file directly as it could be overridden when the Website is published again.

Parameters

This generator does not require any parameter.

The following optional parameter can be used:

reload-conf-propertiesReloads the properties where the path to the website header, header and navigation is stored in case the website has been re-published by PageSeeder.

Returned XML

This generator return the content of the header file. 

The content is wrapped in:

<template-file name="[header-filename]" status="ok">

   <!-- Content of the template file -->

 </template-file >

Generally, the header is a PageSeeder standard document, and would follow the format below: 

<root>

   <!-- metadata for the document -->
   <ps:documentInfo edit="true"> ... </ps:documentInfo>

   <!-- for each document section -->
   <section id="[id]"> ... </section>
   ...

 </root>

Refer to the PageSeeder developer Website for more information about the PageSeeder standard format.

Usage 

To use this generator in Berlioz (in /WEB-INF/config/services.xml):

<generator class="org.weborganic.bastille.web.Getheader" 
            name="[name]" target="[target]"/>

Created on , last edited on