The Detailed search dialog displays selected asset properties. The default dialog is optimized for censhare Dedicated solutions. The dialog can be configured for custom solutions.
Target groups
System administrators Solution developers
Context
The configuration is applied to theDetailed searchin the Top navigation of censhare Web.
Introduction
TheDetailed searchgives users fine-grained search options in censhare Web. The dialog displays input fields for dedicated asset properties. Searches for assets with matching values for one or multiple asset properties are possible. For example, a user can search for assets of the typeProduct / Product categoryAND with the keywordProducts / Outdoor / Hiking.
TheDetailed searchdialog is configured in theDefault Detailed Search Dialogasset and additionalDialogassets that are referenced in the dialog configuration snippet.
As of censhare 2020.3, dynamic search dialogs for specific asset types and user roles can be configured. For more information, see thedefault detailed search configurationbelow.
Concept
The Detailed search dialog is a unique workspace widget that is embedded in the Detailed search menu in the Top navigation:
Module asset name
detailedSearchWidget
Resource key
censhare:workspace.widget.detailedSearchWidget
The Detailed search widget renders the Detailed search dialog:
Module asset name
Default Detailed Search Dialog
Resource key
censhare:metadata.default.asset.search.dialog
Usage
Asset search dialog definition
The dialog configuration is stored in the master file of the dialog asset. The dialog is built with thecenshare UI components:
Groups the dialog inputs in tabs. To localize the tabnameattribute, usecsCommonTranslations.
<cs-dialog-group/>
Optional. Groups the dialog inputs within a tab in sections. To localize thegroup-labelattribute, usecsCommonTranslations.
<cs-search-metadata-row/>
Defines a single search input field. Enter the feature resource key in thekeyattribute.
<cs-include-dialog/>
References another search dialog asset. In theDetailed searchdialog, this directive is used in two ways: (1)Include static dialog snippet:Enter the asset resource key of the dialog to be included in akeyattribute. This is the basic usage of the directive. For more information, see theChunked, reusable dialogssection below. (2)Include dynamic dialog snippet:Use the attributes as shown in the snippet to include an asset type specific dialog, u. For more information, see theDynamic dialogssection below.
Chunked, reusable dialogs
The Detailed search dialog is built from reusable dialog snippets. The dialog has also dynamic search options. The framework is given in the code snippet above. The<cs-include-dialog/>directive allows referencing dialog chunks that can be customized and reused individually.
To include a dialog chunk in the Detailed search dialog, reference the dialog to be included via the asset resource key:
XML
<cs-include-dialog key="'[RESOURCE_KEY]'"/>
The directive renders the referenced dialog chunk as is, without any conditional rendering.
Note:All dialog chunks have also theUsageset toAsset search dialog definition. However, since theResource keyis unique, the usage attribute, it is not necessary to add the Usageattribute in the directive if you use thekeyattribute.
Dynamic dialog rendering
The Detailed search dialog uses dynamic dialog rendering that displays additional search fields for specific asset types. If a user selects an asset type that has additional search parameters in theGeneraltab of theDetailed searchdialog, the<cs-include-dialog/>directive renders an additional tab with these asset type-specific search parameters:
Sets the input values for dynamic rendering as variables in the current context. In this case, the asset type.
usage
censhare:search-dialog-definition
Ensures that only dialog assets with this usage are included.
In dynamic dialog rendering, theusageattribute is mandatory, since the uniquekeyattribute is not used.
How it works
Theobserveattribute checks any user input in the corresponding<include-dialog/>element. If user input is detected, the dialog is rendered again with the input value as attribute. Theasset-typeattribute sets user inputs in theAsset typefield as the current context. User inputs in other search fields have no effect.
For each input value, the directive checks if a dialog snippet exists that matches the two following conditions:
Asource asset filterin the resource metadata that matches the current context asset type. For example:
DisplaysProject parametersas search options for Project assets. This dialog is itself dynamic. When a user selects a root product category, child categories become selectable for a more fine-grained search.
Customization strategies
To customize the Detailed search dialog, choose the appropriate strategy. You can combine different strategies as needed:
Customize individual dialog chunks
Create a Resource replace variant of the desired dialog chunk and open it in an asset page.
In theEditortab, change the dialog items (dialog groups, directives) as desired.
Save your changes.
Result:The Detailed search dialog displays the customized dialog chunk.
Add new static dialog chunks to the Detailed search dialog
Create a newModule / Dialogasset and open it in an asset page.
In theEditortab, configure the dialog items (dialog groups, directives) as desired.
Open theEdit propertiesdialog, and in theUsagefield, selectAsset search dialog definition.
Save your changes.
Create a Resource replace variant of theDefault Detailed Search Dialogand open it on an asset page.
Add the dialog chunk that you created at the desired position using the<cs-include-dialog/>directive with thekeyattribute:
To add the dialog chunk in anew tab, wrap it in a<cs-dialog-tab/>element.
To add the dialog chunk in anew sectionin an existing tab, wrap it in a<cs-dialog-group/>element.
Save your changes.
Result:The Detailed search dialog displays the new dialog chunk in an additional tab, or in an additional section within a tab.
Add new dynamic dialog chunks to the Detailed search dialog
Create a newModule / Dialogasset and open it on an asset page.
In theEditortab, configure the dialog items (dialog groups, directives) as desired.
Open theEdit propertiesdialog, and add the following:
in theUsagefield, selectAsset search dialog definition.
In theResource metadatafield, enter an XML snippet with at least one source asset filter. Leave the target asset filter empty. Escape the inner apostrophes as shown and replace[TYPE]with the desired asset type:
Create a Resource replace variant of theDefault Detailed Search Dialogand open it on an asset page.
Add the dialog chunk that you created at the desired position using the<cs-include-dialog/>directive with theid,observe,asset-type,andusageattributes as shown above.
Save your changes.
Result:If a user selects the asset type, for which you created a specific dialog chunk in theGeneraltab of theDetailed search, a new tab for this asset type with the respective search fields displays.
Create role-specific dialog chunks
Create a Resource replace variant of the dialog chunk for which you want to create role-specific search fields.
Open the Resource replace variant on an asset page.
In theEditortab, change the dialog items as desired.
Save your changes.
Go to theAdministrationtab.
In theResource replace variantof Widget, move the cursor over the Original dialog chunk, click
and selectEdit relation properties.
In the dialog, in theResource replace rolefield, select the desired user role. You can select multiple roles, if necessary.
Click OK to save your changes and close the dialog.
Result:If a user with that default user role opens the Detailed search, the respective tab shows the Resource replace variant instead of the original dialog chunk.
Configure the keyword search
censhare provides two ways of structured, hierarchical keywords. Which of these you are using determines as well the configuration of the Detailed search. Usually, either the keyword tree or the keyword asset structure is used in one instance. You can, however, use both simultaneously or, for example, in different domains. For more information, seeWork with keywords.
Keyword tree
The keyword tree is stored as an asset feature. The keywords are stored in a hierarchical value list in the censhare Admin Client. To add, remove or edit these keywords you need the respective permissions. Keywords can be localized. These keywords cannot be edited from censhare Web.
Keyword structures
Keyword structures are based on assets. Each keyword is represented by a "Keyword" asset. Keyword assets can be related using the "Keyword hierarchy" relation (ID: "user.keyword-hierarchy."). This allows more flexible keyword structures than in the keyword tree. Users with the respective permissions can create new keyword assets and relate them to each other. keyword assets are assigned to an asset using the "Keyword" reference.
Make sure that the "Calculate keywords hierarchical" module is enabled in the censhare Admin Client.
JavaScript errors detected
Please note, these errors can depend on your browser setup.
If this problem persists, please contact our support.