Replace by another field the title in the tree navigation
In my application Title is really long and I don't want to expose it into the tree navigation and use my field expressed into the schema mySchema and the field called shortTitle.
1 votes
1 answers
1904 views
If you want to test quickly :
- Start a nuxeo
- Enable the development profile (Admin Center > Update Center > Studio > Click on the button)
- Restart
- In the file $NUXEO_HOME/nxserver/nuxeo.war/incl/tree_explorer.xhtml
Replace line 47 the following content
<h:outputText value="#{nxd:titleOrId(node.document)}" />
by the that
<h:outputText value="#{node.document.dublincore.creator}" />
If you are satisfied :
- create a bundle project
- in the src/main/resources/web/nuxeo.war/incl/ copy the modified file
- and create a file name deployment-fragment.xml with the following content
Here is the content of the file:
<?xml version="1.0"?>
<fragment version="1">
<require>org.nuxeo.ecm.webapp.ui</require>
<install>
<!-- unzip the war template -->
<unzip from="${bundle.fileName}" to="/" prefix="web">
<include>web/nuxeo.war/**</include>
</unzip>
</install>
</fragment>