[opencms-dev] how to get 2 blocks from the WYSIWYG editor on one page
Dan Moore
Dan.Moore at xor.com
Thu May 2 01:20:39 CEST 2002
Hi folks,
I'm a bit stymied on something that seems like it should be pretty
elementary.
I have a two column page, and both columns need to be edited by different
folks in the WYSIWYG editor.
Here's what I did:
I create a master template (called master) that defines three elements:
leftcol, rightcol and frametemplate, and then:
<TEMPLATE>
<ELEMENT name="frametemplate"/>
</TEMPLATE>
'frametemplate' includes both the leftcol and rightcol templates:
<![CDATA[
<TD width="50%">
]]>
<ELEMENT name="leftcol"/>
<![CDATA[
</TD>
<TD width="50%">
]]>
<ELEMENT name="rightcol"/>
<![CDATA[
</TD>]]>
Both leftcol and rightcol are templates (and so show up in the template
pulldown of the 'create new page' wizard).
They both contain a reference to a content template that is named 'mybody'
which does nothing more than contain this:
<?xml version="1.0"?>
<XMLTEMPLATE>
<TEMPLATE> <ELEMENT name="body"/> </TEMPLATE>
</XMLTEMPLATE>
Well and good. I can create a new leftcol page (lefttest1.html) and a new
rightcol page (righttest1.html) and both the contents can be created with
the WYSIWYG.
But I can't for the life of me figure out how to have lefttest1.html and
righttest1.html appear on the same page.
Creating a page with the 'master' template, and editing it with the WYSIWYG
editor gives both columns the same content (I assume because the body
element is set to the same value for both templates).
The userguide has this to say (on page 52 of the PDF):
"For every new page that is created with OpenCms the system automatically
creates a page-control file. This page-control file determines the
mastertemplate that is used by the new page and contains the element
definition of the body element."
I can't find the page-control file to do further examination, but I'm not
sure I want to mess with this file, since it is automatically generated.
While it seems easy to include content generated by multiple java
classes into one page, it doesn't seem possible to pull content from
even two different WYSIWYG sessions into one page.
Any help would be appreciated.
Dan
More information about the opencms-dev
mailing list