06-03-2015 02:49 PM
I created my own contribution to document types, my custom document type contains the following fields: Montant, client, date, mode de règlement ONLY but in render the field Title/Description are added. I don't know how to remove them.
10-30-2015 01:28 AM
The Nuxeo defaultly provides Title and Description in its layout. I suggest you to load ur own layout in order to override the default layout given by nuxeo. So according to your need, create a "layout-contrib.xml" as below.
<extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
point="layouts">
<layout name="ur_layout_name">
<templates>
<template mode="any">/layouts/layout_default_template.xhtml
</template>
</templates>
<rows>
<row>
<widget>Montant</widget>
</row>
<row>
<widget>client</widget>
</row>
<!-- As many fields u want-->
</rows>
<widget name="Montant" type="int">
<labels>
<label mode="any">Montant</label>
</labels>
<translated>false</translated>
<fields>
<field>lds:intField</field>
</fields>
</widget>
<widget name="client" type="text">
<labels>
<label mode="any">Client</label>
</labels>
<translated>false</translated>
<fields>
<field>lds:textField</field>
</fields>
</widget>
</layout>
</extension>
We need to define our own schema which defines few datatypes. So declare ur schema in core-types-contrib.xml.
<schema name="layout_demo_schema" prefix="lds" src="schema/layout_demo_schema.xsd" />
Define the datatypes which are needed. For example, here we want int, text, date field etc. So create ur schema layout_demo_schema.xsd and define these datatypes.
<xs:element name="intField" type="xs:int" />
<xs:element name="textField" type="xs:string" />
Don't forget to declare your layout in ui-types-contrib.xml.
<layouts mode="any">
<layout>ur_layout_name</layout>
</layouts>
Even I wanted a similar customized folder type metadata and have a look at the attached image how i achieved. That's all, its easy to create custom fields in nuxeo and to play with it.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.