[opencms-dev] OpenCms how to get 2 blocks from the WYSIWYG editor onone page

Yu Shao yu.shao at spectracom.com
Tue Oct 29 22:37:15 CET 2002


Hi, 

I followed exactly what is described in the mailing list email on how to get 2 blocks from WYSIWYG editor on one page. But whenever I enter the editor, I didn't see there is a body pull down menu. What am I doing wrong or did I miss something? I am using OpenCms 5.0 beta + Tomcat 4.1.12 + Linux 7.2. Your help will be greatly appreciated!

Here is what is described in the email: 

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. 


----- 
Yu Shao 
Programmer Analyst 
SpectraCom      
---     
131 W. Seeboth Street   
Milwaukee, WI  53204    
(414) 272-7742  Telephone       
(414) 272-1123  Fax     
---     
www.spectracom.com      
----- 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20021029/57945a15/attachment.htm>


More information about the opencms-dev mailing list