page:pageContext

This tag will get you the TemplateController-object (org.infoglue.deliver.controllers.kernel.impl.simple.BasicTemplateController@1f5c6476 in velocity). That object has a lot of usefull API:s not offered by the tags. Check out the org.infoglue.deliver.controllers.kernel.impl.simple.BasicTemplateController-class for more information.

Parameters

Name

Required

Default

Type

Description

id

true

 

String

The result is stored in this variable.

ID-result variable contains:
An org.infoglue.deliver.controllers.kernel.impl.simple.BasicTemplateController-object.

Examples

The following example gets the BasicTemplateController-object(same as $templateLogic) and puts it in the variable "pc". Then we can call any method it has. Look at the javadoc for that class for more information on what methods are available.

<%@ taglib uri="infoglue-page" prefix="page" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<page:pageContext id="pc"/>
<c:set var="availableLanguages" value="${pc.availableLanguages}"/>
The variable "availableLanguages" now contains a list of allowed languages for the current page.
<content:contentAttribute id="responsibleName" contentId="${pc.metaInformationContentId}" attributeName="responsibleName"/>
This shows another call which gets the meta info content id for the page so we can extract non standard attributes from it if we added our own.



comments powered by Disqus