[EMAIL PROTECTED] wrote:
> Hello
>
> I have the same question. I need to add custom metadata.
> How come nobody has answered? or have you already figured it out?
>
> Thanks
> _______________________________________________
> ECM mailing list
> [email protected]
> http://lists.nuxeo.com/mailman/listinfo/ecm
>
>
Hi,
Recently, I modified the fields of the default metadata. I tell you the
steps that I follow:
1. Create a new plugin.
2. Modify the dublincore schema and place it in resources/schemas in
your project folder.
3. Override the old dublincore using the following extension point:
<require>org.nuxeo.ecm.core.schema.TypeService</require>
<require>org.nuxeo.ecm.core.CoreExtensions</require>
<extension target="org.nuxeo.ecm.core.schema.TypeService"
point="schema">
<schema name="dublincore" prefix="dc" override="true"
src="schemas/dublincore.xsd" />
</extension>
4. Define a layout for the dublincore schema. For example:
<extension
target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
point="layouts">
<layout name="dublincore">
<templates>
<template mode="any">
/layouts/layout_default_template.xhtml
</template>
</templates>
<rows>
<row>
<widget>widget1</widget>
</row>
<row>
<widget>widget2</widget>
</row>
...
<row>
<widget>widgetn</widget>
</row>
</rows>
<widget name="widget1" type="template">
<labels>
<label mode="any">label.dublincore.widget1</label>
</labels>
<translated>true</translated>
<fields>
<field>dc:field1</field>
<field>dc:field2</field>
<field>dc:field3</field>
</fields>
<properties mode="any">
<property name="template">
/widgets/values_widget1.xhtml
</property>
</properties>
</widget>
...
<widget name="widgetn" type="template">
<labels>
<label mode="any">
label.dublincore.widgetn
</label>
</labels>
<translated>true</translated>
<fields>
<field>dc:fieldn</field>
</fields>
<properties mode="any">
<property name="template">
/widgets/values_widgetn.xhtml
</property>
</properties>
<properties widgetMode="edit">
<property name="styleClass">dataInputText</property>
</properties>
</widget>
</layout>
</extension>
As you can see, the widget called widget1 uses the fields dc:field1,
dc:field2 and dc:field3 (these fields are defined in the dublincore
schema that we created before) and uses a view placed in
/widgets/values_widget1.xhtml (you must create all the views that you
need and place it in your plugin folder).
Regards.
--
Enrique Pérez Olivares.
Dpto I+D.
Yerbabuena Software.
[EMAIL PROTECTED]
http://www.yerbabuena.es
Tlf/Fax: 902 995 246
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm