How to customize the properties in the thumbnail view?

How can I customize the information displayed below the picture thumbnail in the search results, or in a content view? Like on this picture, you can see that there is some custom information at the bottom:

type an image title

0 votes

1 answers

3370 views

ANSWER



Dear me,

Thank you for asking; this is easy to achieve using Nuxeo Studio.

  • In Advanced Settings > XML Extensions, create a new entry. The name you give it doesn't matter.

  • Into it, paste the following code and save.

<extension point="layouts" target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager">
<layout name="document_listing_thumbnail" type="listingThumbnail">
      <columns>
        <column name="last_contributor">
          <properties mode="any">
            <property name="label">label.dublincore.lastContributor</property>
          </properties>
          <widget>listing_last_contributor</widget>
        </column>
        <column name="size_and_format">
          <properties mode="any">
            <property name="label">
              label.selection.column.size_and_format
            </property>
          </properties>
          <widget>my_custom_dam_thumbnail_widget</widget>
        </column>
      </columns>
    </layout>
</extension>

<extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
   point="widgets">
  <widget name="my_custom_dam_thumbnail_widget" type="layout">
    <labels>
      <label mode="any"></label>
    </labels>
    <translated>false</translated>
    <fields>
      <field>data</field>
    </fields>
    <properties widgetMode="any">
      <property name="name">MyDAMThumbnailLayout@view</property>
      <property name="widgetsDisplay">no_label</property>
    </properties>
  </widget>
</extension>
  • Now go to Listing and Views > Form Layouts and create a new entry. This time you should name it “MyDAMThumbnailLayout” (without the quotes of course). Don't name it differently unless you adapt the XML extension accordingly or it won't work!

  • Switch to the “View Layout” tab, edit it to your liking and save.

  • Deploy your configuration, and you are done! Piece of cake!

PS: If you wonder, the original contribution is here: http://explorer.nuxeo.com/nuxeo/site/distribution/current/viewContribution/org.nuxeo.ecm.platform.forms.layouts.webapp.listing--layouts => search for layout document_listing_thumbnail You should also take a look at the XML extensions video on Nuxeo University to learn more about them.

1 votes