<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi John,</p>
<p>your question has been not answered for ages. Sorry about that. I
think the formatter configuration is the thing you were not aware
about. You have a container of type "center". Configure your
formatter to fit into containers of type "center". Then you should
be able to place it in the container page using the template. If
not, Either the schema or the formatter is incorrect. To evaluate
this, try to add a content of the type via the explorer and try to
edit it. It it works - schema is correct. To evaluate the
formatter, just place <div>Hello</div> as formatter,
put the content on the page (new content has to be edited to be
stored), and then replace the formatter with the original version.
The formatter will render - possibly showing an error.</p>
<p>Best, Daniel.<br>
</p>
<br>
<div class="moz-cite-prefix">Am 21.04.2016 um 00:32 schrieb John
Bieling:<br>
</div>
<blockquote cite="mid:57180371.50903@gmx.de" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
I am reading all the documentation I can find, but I am not able
to migrate my template. As a first step, I am trying to create a
new and very simple OpenCMS 10 template following <br>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://documentation.opencms.org/opencms-documentation/creating-a-website/creating-a-template-jsp/">http://documentation.opencms.org/opencms-documentation/creating-a-website/creating-a-template-jsp/</a><br>
<br>
I am lost at step 9.<br>
<br>
I now have a very simple container page template:<br>
<br>
<span style="color: rgb(20, 67, 130); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(245, 245, 245);"><%</span><span class="hljs-annotation" style="box-sizing: border-box; border-radius: 0px; color: rgb(33, 151, 219); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(245, 245, 245);">@page</span><sp an="" style="color: rgb(20, 67, 130); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(245, 245, 245);"> buffer=<span class="hljs-string" style="box-sizing: border-box; border-radius: 0px; color: rgb(33, 151, 219); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(245, 245, 245);">"none"</span><span style="color: rgb(20, 67, 130); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(245, 245, 245);"> session=</span><span class="hljs-string" style="box-sizing: border-box; border-radius: 0px; color: rgb(33, 151, 219); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(245, 245, 245);">"false"</span><span style="colo
r: rgb(20, 67, 130); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(245, 245, 245);"> trimDirectiveWhitespaces=</span><span class="hljs-string" style="box-sizing: border-box; border-radius: 0px; color: rgb(33, 151, 219); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(245, 245, 245);">"true"</span><span s="" tyle="color: rgb(20, 67, 130); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(245, 245, 245);"> %>
<%@ taglib prefix=</span><span class="hljs-string" style="box-sizing: border-box; border-radius: 0px; color: rgb(33, 151, 219); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(245, 245, 245);">"cms"</span><span style="color: rgb(20, 67, 130); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(245, 245, 24
5);"> uri=</span><span class="hljs-string" style="box-sizing: border-box; border-radius: 0px; color: rgb(33, 151, 219); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(245, 245, 245);"><a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.opencms.org/taglib/cms">"http://www.opencms.org/taglib/cms"</a></span><span style="color: rgb(20, 67, 130); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-tex
t-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(245, 245, 245);"> %>
<%@ taglib prefix=</span><span class="hljs-string" style="box-sizing: border-box; border-radius: 0px; color: rgb(33, 151, 219); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(245, 245, 245);">"fmt"</span><span style="color: rgb(20, 67, 130); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(245, 245, 24
5);"> uri=</span><span class="hljs-string" style="box-sizing: border-box; border-radius: 0px; color: rgb(33, 151, 219); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(245, 245, 245);"><a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://java.sun.com/jsp/jstl/fmt">"http://java.sun.com/jsp/jstl/fmt"</a></span><span style="color: rgb(20, 67, 130); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-
stroke-width: 0px; display: inline !important; float: none; background-color: rgb(245, 245, 245);"> %>
<%@ taglib prefix=</span><span class="hljs-string" style="box-sizing: border-box; border-radius: 0px; color: rgb(33, 151, 219); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(245, 245, 245);">"fn"</span><span style="color: rgb(20, 67, 130); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(245, 245, 245
);"> uri=</span><span class="hljs-string" style="box-sizing: border-box; border-radius: 0px; color: rgb(33, 151, 219); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(245, 245, 245);"><a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://java.sun.com/jsp/jstl/functions">"http://java.sun.com/jsp/jstl/functions"</a></span><span style="color: rgb(20, 67, 130); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -w
ebkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(245, 245, 245);"> %>
<%@ taglib prefix=</span><span class="hljs-string" style="box-sizing: border-box; border-radius: 0px; color: rgb(33, 151, 219); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(245, 245, 245);">"c"</span><span style="color: rgb(20, 67, 130); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(245, 245, 245)
;"> uri=</span><span class="hljs-string" style="box-sizing: border-box; border-radius: 0px; color: rgb(33, 151, 219); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(245, 245, 245);"><a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://java.sun.com/jsp/jstl/core">"http://java.sun.com/jsp/jstl/core"</a></span><span style="color: rgb(20, 67, 130); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18.5714px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px; -webkit-text-
stroke-width: 0px; display: inline !important; float: none; background-color: rgb(245, 245, 245);"> %></span>
<html>
<head>
<title>Test</title>
<cms:enable-ade />
</head>
<body>
<div id="HEADER">header</div>
<div id="NAVIGATION">navigation</div>
<cms:container name="CENTERCOLUMN" type="center"
width="100" />
<div id="FOOTER">footer</div>
</body>
</html>
The root folder of my test site has a "template" property pointing
to that container page template.
For the first test, I want to use a very simple custom content type
with the following schema:
<xsd:schema xmlns:xsd=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
elementFormDefault="qualified">
<xsd:include
schemaLocation="opencms://opencms-xmlcontent.xsd"/>
<xsd:element name="SimplePageTypes"
type="OpenCmsSimplePageTypes"/>
<xsd:complexType name="OpenCmsSimplePageTypes">
<xsd:sequence>
<xsd:element name="SimplePageType"
type="OpenCmsSimplePageType" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsSimplePageType">
<xsd:sequence>
<xsd:element name="Menu" type="OpenCmsString"
minOccurs="0" maxOccurs="1" />
<xsd:element name="Author" type="OpenCmsString" />
<xsd:element name="Release" type="OpenCmsDateTime"
/>
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale"
use="optional" />
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<mappings>
<mapping element="Release"
mapto="attribute:datereleased" />
<mapping element="Menu" mapto="property:NavText"
/>
</mappings>
<defaults>
<default element="Author"
value="${currentuser.firstname} ${currentuser.lastname}"/>
<default element="Release"
value="${currenttime}"/>
</defaults>
<formatters>
<formatter minwidth="100"
uri="/system/modules/mymodule/formatters/container-formatter.jsp"/>
</formatters>
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
The formatter is also very simple and looks as follows:
<%@ taglib prefix="cms" uri=<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opencms.org/taglib/cms">http://www.opencms.org/taglib/cms</a>"
%>
<cms:formatter var="content">
<div class="article">
<h1>${content.value.Menu}</h1>
</div>
</cms:formatter>
And now what? I can create a new container page, but do not see how
to link it to my XSD /Resource-Type. It is not showing any
"containers" or anything to enter content.
Any ideas?
Thanks
John
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre wrap="">_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
<a class="moz-txt-link-freetext" href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a>
</pre>
</sp></blockquote>
<br>
<pre class="moz-signature" cols="72">--
Kind Regards,
Daniel.
-------------------
Daniel Seidel
Alkacon Software GmbH & Co. KG - The OpenCms Experts
<a class="moz-txt-link-freetext" href="http://www.alkacon.com">http://www.alkacon.com</a> - <a class="moz-txt-link-freetext" href="http://www.opencms.org">http://www.opencms.org</a> </pre>
</body>
</html>