How to use the headermanager

Get the Headermanager via singleton,set the last modified date and send the header (before you flush any site-output).


using('cube.core.http','headermanager');
$headerManager = & singleton_Singleton::getInstance('http_headermanager');
$headerManager->setLastModifiedDate($lastDate);
$headerManager->sendHeader();

If the site should be reloaded anytime, use this instead:

using('cube.core.http','headermanager');
$headerManager = & singleton_Singleton::getInstance('http_headermanager');
$headerManager->setAlwaysReload(true);
$headerManager->sendHeader();

How to use the header taglib

Add the taglib to the head part of your cube stylesheet.


<cube:addTagLib namespace="cube.apps.ui" file="header" prefix="hedr"/>
<hedr:header/>

Set the taglib to be visible. (Default is visible, so you don't need this if you not changed the taglib to be invisible before).

$headerManager->setShowTagLib(true);