Dashboard > Community Wiki Archive > Home > DefineTemplatesBasedOnTheExtension
DefineTemplatesBasedOnTheExtension Log In View a printable version of the current page.

Added by GrĂ©gory Joseph , last edited by GrĂ©gory Joseph on May 09, 2008  (view change)
Labels: 

If you want to define templates based on the extension you can do it in config/templateInfo/Templates.xml there you can define which template (SubTemplates) to process based on the request URI "extension".

--------------- Templates.xml

<node name="0001"> 
<node name="jcr:ObjectClasses" /> 
<property name="visible" type="Boolean">true</property> 
<property name="name" type="String">sampleBasic</property> 
<property name="path" type="String">/templates/jsp/samples/basicTemplate/main.jsp</property> 
<property name="type" type="String">jsp</property> 
<property name="title" type="String">Magnolia Sample Template: Basic</property> 
<property name="description" type="String"> 
A simple example template to create content paragraphs</property> 
<property name="image" type="String"></property> 
<node name="SubTemplates"> 
<node name="jcr:ObjectClasses" /> 
<node name="0001"> 
<property name="extension" type="String">pdf</property> 
<property name="path" type="String">JSP To Be Evaluated</property> 
</node> 
<node name="0002"> 
<property name="extension" type="String">php</property> 
<property name="path" type="String">Cool JSP To Be Evaluated</property> 
</node> 
</node> 
</node>

In its previous incarnation on JspWiki, this page was last edited on Feb 9, 2007 10:11:28 AM by BorisKraft
Other known authors include :

  • RalfHirning
Powered by a free Atlassian Confluence Open Source Project License granted to Magnolia International. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators