How to hide or remove the title "Metadata" from the default summary tab of a document?

Where can i edit to disable this title from coming up.alt text

0 votes

2 answers

2549 views

ANSWER

I'm afraid we have to disable the default summary tab to create a custom one without the Metadata title… I'm also interested in this question…
11/22/2013



Hi,

If this is the default summary, you can override the default widget handling this:

In 5.6, the label was harcoded anyway in the template at /widgets/summary/metadata_custom_widget_template.xhtml (see NXP-10949)

In 5.8, you can just override the default widget configuration to hide the “Custom Metadata” label:

<widget name="summary_current_document_view" type="summary_current_document_view">
  <labels>
    <label mode="any"></label>
  </labels>
  <controls mode="any">
    <control name="requireSurroundingForm">true</control>
    <control name="handleLabels">true</control>
  </controls>
</widget>

Setting an empty label will make it fallback on the default “metadata” label. If you do not want any label, you can remove the “handleLabels” control and leave an empty label.

Note there is another widget, showing only the dublincore metadata (displayed by default on Note and File document types) that should be overriden too to get rid of the “Metadata” label:

<widget name="summary_current_document_dublincore" type="summary_current_document_dublincore">
  <labels>
    <label mode="any"></label>
  </labels>
  <controls mode="any">
    <control name="requireSurroundingForm">true</control>
    <control name="handleLabels">true</control>
  </controls>
</widget>

Do not forget to add the following require to your contribution to ensure override:

<component ...>
  <require>org.nuxeo.ecm.platform.forms.layouts.webapp.summary</require>
  <extension ...>
    <widget...>
      [...]
    </widget>
  </extension>
</component>

HTH

0 votes



For Nuxeo 5.6 » The title is displayed using the fragment held in metadata_custom_widget_template.xhtml in *\nuxeo.war\widgets\summary. You can simply contribute an override for this fragment removing the following code… which displays the 'metadata' title

<h3 class="summaryTitle">
    <h:outputText value="#{messages['action.view.metadata.specific']}" />
</h3>    

You could override the action.view.metadata.specific label but this wouldn't reclaim the space and may have other side-effects (you'd have to check where else the tag is use).

0 votes