[opencms-dev] Template is designed how to get it to be listed

visser arthur (02VOEMDIAHTKAND) arthur.visser at student.groept.be
Sat Feb 12 17:35:34 CET 2005


Did you check your directory listing where you stored the template?
Templates should be in designated /system/modules/your.site/templates (XML) directory. The XML file refers to your JSP template. Related files are best put in /your.site/jsptemplates (your JSP template) and your.site/resources (e.g. CSS) and /your.site/elements (JSP scriplets).

Store your JSP file (yourtemplate.jsp) in jsptemplates and create a yourtemplate.xml file with (same name but with *.xml) in /templates. XML should look like :


<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- This links the XMLTemplate mechanism with the JSP templates.
     So far it is required because the WYSIWYG editor (OpenCMS version 5.0) still is completly based on the XMLTemplates. -->

<xmltemplate>

<!-- Define the stylesheet for the WYSIWYG editor (if any) -->

<stylesheet></stylesheet>

<!-- Template description - template for your website -->

<template>
    <element name="jsptemplate"/>
</template>

<!-- This describes the "jsptemplate" element used above.-->

     <elementdef name="jsptemplate">
     <class>com.opencms.flex.CmsJspTemplate</class>   
     <template>../jsptemplates/yourtemplate.jsp</template>
     </elementdef>
    
</xmltemplate>


This should work.



More information about the opencms-dev mailing list