Tutorials

Task-driven tutorials and recipes for PageSeeder

How to display an image thumbnail for a document

Skills required:None
Time required:15
Intended audience:Developer
Difficulty:Easy
Category:Document

Objective

PageSeeder can display a thumbnail of the first image in a document in place of the usual file icon in search results, XRef lookups and the omnibox. By the end of this tutorial the ability, to configure PageSeeder so that the thumbnail is displayed instead of the standard icon, will be gained.

Configuration

In order to display a thumbnail in place of the icon, PageSeeder must know which document type this applies to.

This can be configured in the project.properties.

Go to the developer tools for the project;

Browse the project files and edit the project.properties;

If it does not exist, create a project.properties file in the config folder of the project;

Add/edit the property featuredImageDocumentTypes so that the applicable document types are listed separated by a comma.

Example

To display the film poster cover of a document type 'movie_information' in the 'movie' project, ensure that the file:

[webapp]/WEB-INF/template/movie/config/project.properties

contains the following line:

featuredImageDocumentTypes=movie_information

Limitations and troubleshooting

In order for this to work, ensure that:

  • The applicable documents have a document type (e.g. 'movie_information');
  • The applicable documents contain at least one graphic, that is an image document in PageSeeder (must be either PNG, JPG, or GIF);
  • The graphic reference is using the permalink URL (i.e. starting with /uri/);
  • Only the first image is used;
  • The XSLT Cache must be reloaded (Reload icon in the developer actions - top left in developer perspective).

Created on , last edited on