Enable Search bar in Select Image of Page Thumbnail

Last update: 2023-11-30

Learn how to enable the search bar in the image selection dialog.

Description

Environment

AEM as a Cloud Service

Issue/Symptoms

A page thumbnail can be added by going to Property > Thumbnail > Select Image. But currently, the search bar is not available by default in the image selection dialog [ 1] .

Resolution

  1. Create the overlay of pagethumbnail.js.
    • Source: /libs/cq/gui/components/common/wcm/clientlibs/wcm/js/pagethumbnail.js
    • Destination: /apps/cq/gui/components/common/wcm/clientlibs/wcm/js/pagethumbnail.js
  2. Add “&nodeTypes=dam%3AAsset” to the URL for the dialog.
    • Before: var src = "/mnt/overlay/granite/ui/content/coral/foundation/form/pathfield/picker.html" + "?_charset_=utf-8&path=%2fcontent%2fdam&root=%2fcontent%2fdam&filter=hierarchyNotFile&selectionCount=single";
    • After: var src = "/mnt/overlay/granite/ui/content/coral/foundation/form/pathfield/picker.html" + "?_charset_=utf-8&path=%2fcontent%2fdam&root=%2fcontent%2fdam&filter=hierarchyNotFile&selectionCount=single&nodeTypes=dam%3AAsset";
  3. Deploy the change via Cloud Manager and check if the Search bar appears.

Related reading

[ 1]  Generic Lucene Index Removal > Path Field Picker Search in the AEM as a cloud service user guide.

On this page