Hi,

Francisco José González a écrit :
Hello,

I would like to change nuxeo default File layout with a personal layout made by myself, in a new layout-contrib.xml file, and without modifying nuxeo original sources. The problem I have found is I cannot use the new config for layouts :

/<layouts mode="any">
        <layout>heading</layout>
        <layout>file</layout>
</layouts>/

However, if I use the old config, it works:

<layout>
        <widget jsfcomponent="h:inputText" schemaname="dublincore"
          fieldname="title" required="true" />
        <widget jsfcomponent="h:inputTextarea" schemaname="dublincore"
          fieldname="description" />
....
</layout>/
/
I have looked for the File original layout in nuxeo sources and found this:
/
<type>
.....//

*<!-- old layout config, to remove so that new layout is used -->*
      <layout>
        <widget jsfcomponent="h:inputText" schemaname="dublincore"
          fieldname="title" required="true" />
        <widget jsfcomponent="h:inputTextarea" schemaname="dublincore"
          fieldname="description" />
        <widget jsfcomponent="t:inputFileUpload" schemaname="file"
          fieldname="content" />
      </layout>
 </type>
/
I understand, I would have to remove these last lines but, is there any way to do this without deleting anything in original nuxeo sources??

You're right, it's not possible to remove this old configuration cleanly: removal was never implemented for this now deprecated field.

However, you can register again the entire "File" ecm type, removing it first and then adding it again with the whole configuration you'd like to get:

<type id="File" remove="true" />
<type id="File">
...
</type>

Also be sure your override is loaded after the original one by adding on top of your contribution :

<require>org.nuxeo.ecm.platform.types</require>

Regards,

--
Anahide Tchertchian, Nuxeo
Mail: [email protected] - Tel: +33 (0)1 40 33 79 87
http://www.nuxeo.com - http://www.nuxeo.org
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm

Reply via email to