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

Thomas Gick thomasgick at web.de
Tue Oct 29 23:19:24 CET 2002


Hi Yu,

you have to create your bodies manually. if you create a new textbody
and don´t give it a special name it will be named "body2", "body3" and so
on.
if you enter "left" or "right" in the associated text field before
creating a new body, there is possible a error in the following view.
You have to reload the page to see the name you entered before.

If you don´t the the template selector you have to activate it first.
As of 5.0 you can activate and deactive some features of the wysiwyg
editor.

I hope it helps,
Thomas



Tuesday, October 29, 2002, 10:37:15 PM, you wrote:

YS> Hi, 

YS> 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
YS> 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!
YS> Here is what is described in the email: 

YS> I have a master template, /content/templates/master2col, which looks 
YS> like this: 

YS> ------------master2col (template)---------------- 
YS> <?xml version="1.0"?> 
YS> <XMLTEMPLATE> 

YS> <ELEMENTDEF name="left"> 
YS> <TEMPLATESELECTOR>left</TEMPLATESELECTOR> 
YS> </ELEMENTDEF> 

YS> <ELEMENTDEF name="right"> 
YS> <TEMPLATESELECTOR>right</TEMPLATESELECTOR> 
YS> </ELEMENTDEF> 

YS> <ELEMENTDEF name="frametemplate"> 
YS> <CLASS>com.opencms.template.CmsXmlTemplate</CLASS> 
YS> <TEMPLATE>/content/frametemplates/twocolframe</TEMPLATE> </ELEMENTDEF> 

YS> <TEMPLATE> <ELEMENT name="frametemplate"/> </TEMPLATE> 
YS> </XMLTEMPLATE> 
YS> ------------master2col (template)---------------- 

YS> /content/templates/master2col is of resource type 'plain', not XML 
YS> template. 

YS> I have a frame templates called /content/frametemplates/twocolframe which 
YS> looks like this: 

YS> ------------twocolframe---------------- 
YS> <XMLTEMPLATE> <TEMPLATE> 
YS> <![CDATA[ 
YS> <HTML> <HEAD> <TITLE>]]><method name="getTitle"/><![CDATA[</TITLE> </HEAD> 
YS> <BODY> <TABLE border width="100%" height="100%"> 
YS> <TR height="30%"> <TH colspan=2 width="100%" align="center"> The Head 
YS> section </TH> </TR> <TR height="70%"> <TD width="50%"> 
]]>> 
YS> <ELEMENT name="left"/> 
YS> <![CDATA[ 
YS> </TD> <TD width="50%"> ]]> 
YS> <ELEMENT name="right"/> 
YS> <![CDATA[ 
YS> </TD> </TR> 

YS> </TABLE> </BODY> </HTML>]]> 
YS> </TEMPLATE> 
YS> </XMLTEMPLATE> 
YS> ------------twocolframe---------------- 

YS> I created another 'plain' file in /content/default_bodies called 
YS> master2col, which looks like this: 

YS> ------------master2col (default_body)---------------- 
YS> <?xml version="1.0"?> 
YS> <XMLTEMPLATE> 
YS> <TEMPLATE/> 
YS> <edittemplate/> 
YS> <template name="left"> 
YS> <![CDATA[ 
]]>> 
YS> </template> 
YS> <edittemplate name="left"> 
YS> <![CDATA[ 
]]>> 
YS> </edittemplate> 
YS> <template name="right"/> 

YS> <edittemplate name="right"/> 
YS> </XMLTEMPLATE> 
YS> ------------master2col (default_body)---------------- 

YS> which is what I copied from the previous message (with edits for the names 
YS> of the columns). 

YS> Now, when I go to an unpublished folder in my project, and create a new 
YS> page called test, I choose 'master2col' from the template menu and 
YS> 'master2col' from the 'copy body from' menu. 

YS> When I edit the page, I can choose either right or left or default from the 
YS> 'body' pulldown in the editor.  Apparently you don't need to hit the 
YS> 'save and exit' button for each body. 


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





-- 
Best regards,
 Thomas                            mailto:thomasgick at web.de




More information about the opencms-dev mailing list