close

Filter

loading table of contents...

Studio Developer Manual / Version 2110

Table Of Contents

9.19.3.1 Fixed Search Widget

Widget types based on the class FixedSearchWidgetType display the result of exactly one preconfigured search. Because this widget type does not offer any editable state, you should provide the search to execute when you define the widget type. In this way, you can define fixed search widget types showing checked-out documents or the most recently edited pages or arbitrary other searches.

For each type, you should at least specify the name under which the type can be selected in the dropdown box when adding a new widget. At your option, you may also set a title or a description to be shown for your type.

Because you can define multiple types, you must also provide different widget type IDs. You can then use a plain WidgetState element with the chosen type ID and placement attributes to instantiate the widget.

An example configuration of this widget might look like this:

import ConfigureDashboardPlugin from "@coremedia/studio-client.main.editor-components/sdk/dashboard/ConfigureDashboardPlugin";
import SearchState from "@coremedia/studio-client.library-services-api/SearchState";
import FixedSearchWidgetType from "@coremedia/studio-client.main.editor-components/sdk/dashboard/widgets/search/FixedSearchWidgetType";

//...
new ConfigureDashboardPlugin({
  widgets: [
    new SearchState({
      editedByOthers: true,
      editedByMe: false,
      notEdited: false,
      approved: false,
      published: false,
    }),
  ],

  types: [
    new FixedSearchWidgetType({
     id: "editedByOthers",
     name: "Edited by others",
    }),
  ],
})

Example 9.89. Fixed Search widget Configuration


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.