cancel
Showing results for 
Search instead for 
Did you mean: 

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

Ansel_Andrew
Champ in-the-making
Champ in-the-making

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

1 ACCEPTED ANSWER

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

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

View answer in original post

3 REPLIES 3

Guian_
Confirmed Champ
Confirmed Champ

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...

bruce_Grant
Elite Collaborator
Elite Collaborator

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).

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

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