[opencms-dev] New Page doesn't see new templates

tgagne at wideopenwest.com tgagne at wideopenwest.com
Tue Jan 20 18:24:01 CET 2004


I was following the instructions in templates-how-to and copied the master
and jsp template files to the subdirectories "templates" and "jsptemplates"
in a new module I created called "gagne".  I checked the name of the
subdirectories with the howto's module directory names and they match.

When I create a new "page" I don't see my new templates in the drop-down
list.

When I created the folders was I supposed to make them navigable?

Here's the master file (created as plain text--no filename extension,
called masterTemplate)
---------------------------------------------------------------
<?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 still is
     completly based on the XMLTemplates. -->
<xmltemplate>

<!-- Define the stylesheet for the WYSIWYG editor -->
<stylesheet>/system/modules/com.alkacon.documentation.howto-template/resourc
es/mystyle.css</stylesheet>

<!-- Template description, pretty short for a JSP template -->
<template>
    <element name="jsptemplate"/>
</template>

<!-- This describes the "jsptemplate" element used above.
     Important: The element must NOT be called "frametemplate",
     because in that case the stylesheet does not work. -->
<elementdef name="jsptemplate">
    <!-- Always use this class tag when inserting a JSP element in your
page: -->
    <class>com.opencms.flex.CmsJspTemplate</class>   
    <!-- Just add the path to your JSP here: -->
    <template>../jsptemplates/first.jsp</template>
</elementdef>
    
</xmltemplate>
----------------------------------------------------------
And here's the JSP template, called "first.jsp", created as a JSP file
----------------------------------------------------------
<%@ page session="false" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><cms:property name="title" escapeHtml="true" /></title>

<meta HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; CHARSET=<cms:property
name="content-encoding" default="ISO-8859-1" />">

<!-- <link type= "text/css"
href="<cms:link>../resources/mystyle.css</cms:link>">  -->
</head> 
<body><

<h2>My first template head</h2>

<!-- Main pagebody starts here -->

<cms:include element= "body"/> 

<!--Main pagebody ends here -->

<h2>My first template foot</h2><

</body>
</html>


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .





More information about the opencms-dev mailing list