[opencms-dev] bodies element edit order / default element

Marco Celotti marco.celotti at comune.udine.it
Mon Aug 25 12:16:49 CEST 2008


In the end I've found a workaround.
The idea is to avoid the automatic "order by name" when handling elements.
To achieve this:

1) Download source code of OpenCms 7
2) Set up an Eclipse project
3) Comment out the line "Collections.sort(result);" in "computeElements" 
method, inside "CmsDialogElements.java".
4) Substitute the new compiled class inside you opencms.jar file located 
in WEB-INF/lib
5) Restart tomcat

By now this workaround is working on my system.

Marco



opencms-dev-bounces at opencms.org scritti il 30/07/2008 16.44.39

> 
> Hi, 
> I'd like to know if it's possible to set an edit order (or at least 
> a default) for the elements defined inside my custom body. 
> It seems the elements are shown in WYSIWYG editor in alphabetical 
> order;  I'd change this without having to rename all the elements ofmy 
pages.
> I've tried to take a look at the xsd schema here: "http://www.
> opencms.org/dtd/6.0/xmlpage.xsd" but the link seems to be broken.
> 
> This is my custom body and "body_fi" is always shown first, no 
> matter the definition order. 
> How can I get  "body_it" as first/default element? 
> 
> <?xml version="1.0" encoding="UTF-8"?> 
> <pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:
> noNamespaceSchemaLocation="http://www.opencms.org/dtd/6.0/xmlpage.xsd"> 
>   <page language="en"> 
>     <element name="body_it" default="true"> 
>       <links/> 
>       <content><![CDATA[]]></content> 
>     </element> 
>     <element name="body_fi"> 
>       <links/> 
>       <content><![CDATA[]]></content> 
>     </element> 
>   </page> 
> </pages> 
> 
> 
> Thanks, 
> Marco
> _______________________________________________
> 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
> http://lists.opencms.org/mailman/listinfo/opencms-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20080825/942dcee1/attachment.htm>


More information about the opencms-dev mailing list