[opencms-dev] how to get 2 blocks from the WYSIWYG editor on one page
Dan Moore
Dan.Moore at xor.com
Fri May 3 01:00:49 CEST 2002
Hi Stephan.
Thanks for the response. It's working for me now.
Please forgive the length of this response, I wanted future folks who
searched on this topic to gain from my errors.
(I'm using OpenCMS 4.6.0 on linux with tomcat 4.0 and mysql 3.23.49a.)
I have a master template, /content/templates/master2col, which looks
like this:
------------master2col (template)----------------
<?xml version="1.0"?>
<XMLTEMPLATE>
<ELEMENTDEF name="left">
<TEMPLATESELECTOR>left</TEMPLATESELECTOR>
</ELEMENTDEF>
<ELEMENTDEF name="right">
<TEMPLATESELECTOR>right</TEMPLATESELECTOR>
</ELEMENTDEF>
<ELEMENTDEF name="frametemplate">
<CLASS>com.opencms.template.CmsXmlTemplate</CLASS>
<TEMPLATE>/content/frametemplates/twocolframe</TEMPLATE> </ELEMENTDEF>
<TEMPLATE> <ELEMENT name="frametemplate"/> </TEMPLATE>
</XMLTEMPLATE>
------------master2col (template)----------------
/content/templates/master2col is of resource type 'plain', not XML
template.
I have a frame templates called /content/frametemplates/twocolframe which
looks like this:
------------twocolframe----------------
<XMLTEMPLATE> <TEMPLATE>
<![CDATA[
<HTML> <HEAD> <TITLE>]]><method name="getTitle"/><![CDATA[</TITLE> </HEAD>
<BODY> <TABLE border width="100%" height="100%">
<TR height="30%"> <TH colspan=2 width="100%" align="center"> The Head
section </TH> </TR> <TR height="70%"> <TD width="50%">
]]>
<ELEMENT name="left"/>
<![CDATA[
</TD> <TD width="50%"> ]]>
<ELEMENT name="right"/>
<![CDATA[
</TD> </TR>
</TABLE> </BODY> </HTML>]]>
</TEMPLATE>
</XMLTEMPLATE>
------------twocolframe----------------
I created another 'plain' file in /content/default_bodies called
master2col, which looks like this:
------------master2col (default_body)----------------
<?xml version="1.0"?>
<XMLTEMPLATE>
<TEMPLATE/>
<edittemplate/>
<template name="left">
<![CDATA[
]]>
</template>
<edittemplate name="left">
<![CDATA[
]]>
</edittemplate>
<template name="right"/>
<edittemplate name="right"/>
</XMLTEMPLATE>
------------master2col (default_body)----------------
which is what I copied from the previous message (with edits for the names
of the columns).
Now, when I go to an unpublished folder in my project, and create a new
page called test, I choose 'master2col' from the template menu and
'master2col' from the 'copy body from' menu.
When I edit the page, I can choose either right or left or default from the
'body' pulldown in the editor. Apparently you don't need to hit the
'save and exit' button for each body.
More information about the opencms-dev
mailing list