Parameterized Detail Tab Definition Examples

This pages provides example configurations for providing multiple tabs of the same type of detail tab, based on different parameters.

The parameterized detail tabs allows to customize detail tabs based on some given parameters. Essentially it is used to restrict the amount of data being displayed in the tab and by having the ability to create multiple such parameterized detail tabs, users can control which is the essential data and how it needs to be viewed.

As of now, only Characteristics and Preview detail tab can accept parameters and multiple Characteristics and Preview detail tabs can be rendered in the Detail View.

Characteristics Detail Tab

Tab Attributes

Name

M(andatory)
O(ptional)

Example values

Description

id

M

e.g. "CharacteristicTab2"

Id of the tab

rootEntity

M

Article

The root entity associated with the tab

tabType

M

Characteristic

The type of tab that needs to be parameterized.

i18NKey

M

e.g. "CHAR_TAB2"

Tab name on the header of the tab

permissionId

M

e.g. "web.article.detail.tabs.characteristics2"

Permission to display the tab in the detail view

parameter

O

filterCategories
filterType

Parameter used to display the required categories

Tab Parameters

Parameter name

M(andatory)
O(ptional)

Example values

Description

filterCategories

O

e.g. "Shipping"

"CareInstructions,AuditReport"

"ElectronicDevices"

Comma separated category codes which should be displayed or not displayed

filterType

O

include (default)

exclude

Type of filter to be applied on the supplied category names

At max one pair of filterCategories and filterType is allowed per tab.

Display all categories in a single tab

This is the default behavior where all categories are displayed in a single tab.

Example screen:

images/download/attachments/170858526/image2019-1-2_22-25-37.png

Definition ( article.detailtab.parameterized.xml )

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tabDefinitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ParameterizedDetailTabs.xsd">
<tab i18NKey="Characteristics" id="articleCharacteristicDetailTab" permissionId="web.article.detail.tabs.characteristics" position="61" rootEntity="Article" tabType="Characteristic"/>
</tabDefinitions>

Display separate categories in separate tabs

Here we are displaying two tabs -

  1. Tab named "Characteristics " is showing Characteristics belonging to all categories except "Electronic Devices"

  2. Tab named "Electronic Devices" is showing Characteristics belonging to only "Electronic Devices"

Example screens:

images/download/attachments/170858526/image2019-1-2_22-56-4.png

images/download/attachments/170858526/image2019-1-2_22-52-59.png

Definition ( article.detailtab.parameterized.xml )

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tabDefinitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ParameterizedDetailTabs.xsd">
<tab i18NKey="Characteristics" id="articleCharacteristicDetailTab" permissionId="web.article.detail.tabs.characteristics" position="61" rootEntity="Article" tabType="Characteristic">
<parameter name="filterCategories" value="ElectronicDevices"/>
<parameter name="filterType" value="exclude"/>
</tab>
<tab i18NKey="Electronic Devices" id="articleCharacteristicDetailTab2" permissionId="web.article.detail.tabs.characteristics2" position="62" rootEntity="Article" tabType="Characteristic">
<parameter name="filterCategories" value="ElectronicDevices"/>
<parameter name="filterType" value="include"/>
</tab>
</tabDefinitions>

Filter Behavior

filterCategories

filterType

Tab Visibility

Categories displayed

parameter present - comma separated values

parameter present

Yes

Categories mentioned (include or exclude)

parameter present - comma separated values

parameter not present

Yes

Categories mentioned (include)

parameter present - empty value

parameter present - empty value

Yes

All Categories

parameter present - incorrect or empty value

parameter present or not present

No

-

parameter not present

parameter not present

Yes

All Categories

parameter not present

parameter present

No

-

parameter present or not present

parameter present - incorrect or empty value

No

-

images/s/en_GB/7502/03f55dd28656fecb49cdf79d0ae052058a20a5d2/_/images/icons/emoticons/warning.png Invalid filterCategories or filterType will lead to a log entry.

NOTE

  • If same parameter is mentioned multiple times in one tab, then values will be overwritten by the last one.

  • The copy action on the top right corner of the component will filter down to the categories visible (and not all categories assigned to the item).

With 8.2. this functionality is also available for Products and Variants. To configure it the corresponding files product.detailtab.parameterized.xml and variant.detailtab.parameterized.xml have to be adjusted.

Preview Detail Tab

Modification of Preview detail tab for single entity selection and multiple entity selection requires modifications in different XMLs. Just the tabType must be different in tab definitions in both the XMLs

Tab Attributes

Name

M(andatory)
O(ptional)

Example values

Description

id

M

e.g. "ArticlePreviewTab4"

Id of the tab

rootEntity

M

Article

Product

Variant

Structure

The root entity associated with the tab

tabType

M

Preview

ListPreview

The type of tab that needs to be parameterized.

Preview Tab for multi-selection of entities

i18NKey

M

e.g. "My_Preview4"

Tab name on the header of the tab

permissionId

M

e.g. "web.article.detail.tabs.preview4"

Permission to display the tab in the detail view

parameter

O

templateName
hasOpenInNewWindow

Parameter used to display the required template

Parameter used to hide "open in new window" link

Tab Parameters

Parameter name

M(andatory)
O(ptional)

Example values

Description

templateName

O

e.g. "Product - Web, Comparison"

"Item Hierarchy template"

Name of the template which user wants to display in preview tab

hasOpenInNewWindow

O

true (default)

false

To hide the "open in new window" link in specific previews

At max one pair of templateName and hasOpenInNewWindow is allowed per tab.

Display all preview templates in the drop-down in a single tab

  • For single entity selection

This is the default behavior where all preview templates are in the drop-down to select from.

Example screen:

images/download/attachments/170858526/image2019-3-27_12-48-6.png

Definition ( article.detailtab.parameterized.xml )

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tabDefinitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ParameterizedDetailTabs.xsd">
<tab i18NKey="Preview" id="articlePreviewTab" permissionId="web.article.detail.tabs.multichannelpreview" position="15" rootEntity="Article" tabType="Preview"/>
</tabDefinitions>
  • For multiple entity selection

This is the default behavior where all preview templates are in the drop-down to select from.

Example screen:

images/download/attachments/170858526/image2019-3-27_13-29-59.png

Definition ( article.list.detailtab.parameterized.xml )

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tabDefinitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ParameterizedDetailTabs.xsd">
<tab i18NKey="Preview" id="articlePreviewTab" permissionId="web.article.detail.tabs.multichannelpreview" position="15" rootEntity="Article" tabType="ListPreview"/>
</tabDefinitions>

Display separate templates in separate tabs

  • For single entity selection

Here we are displaying two tabs -

  1. Tab named "IBM Aurora" is showing "Item - Web, IBM Aurora (editable)" preview template opened in it with "open in new window" link hidden.

  2. Tab named "Comparison" is showing "Item - Web, Comparison" preview template opened in it with "open in new window" link visible by default.

Example screens:

images/download/attachments/170858526/image2019-3-27_12-56-14.png

images/download/attachments/170858526/image2019-3-27_12-58-34.png

Definition ( article.detailtab.parameterized.xml )

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tabDefinitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ParameterizedDetailTabs.xsd">
<tab i18NKey="IBM Aurora" id="ArticlePreviewTab2" permissionId="web.article.detail.tabs.preview2" position="66" rootEntity="Article" tabType="Preview">
<parameter name="templateName" value="Item - Web, IBM Aurora (editable)"/>
<parameter name="hasOpenInNewWindow" value="false"/>
</tab>
<tab i18NKey="Comparison" id="ArticlePreviewTab5" permissionId="web.article.detail.tabs.preview5" position="71" rootEntity="Article" tabType="Preview">
<parameter name="templateName" value="Item - Web, Comparison"/>
</tab>
</tabDefinitions>
  • For multiple entity selection

Here we are displaying one tab -

  1. Tab named "Comparison" is showing "Item - Web, Comparison" preview template opened in it with "open in new window" link visible by default for 2 item selection.

Example screen:

images/download/attachments/170858526/image2019-3-27_13-45-21.png

Definition ( article.list.detailtab.parameterized.xml )

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tabDefinitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ParameterizedDetailTabs.xsd">
<tab i18NKey="Comparison" id="ArticlePreviewTab5" permissionId="web.article.detail.tabs.preview5" position="71" rootEntity="Article" tabType="ListPreview">
<parameter name="templateName" value="Item - Web, Comparison"/>
</tab>
</tabDefinitions>

Filter Behavior

templateName

hasOpenInNewWindow

Tab Visibility

Behaviour

Parameter not present

parameter present

Yes

Preview Tab with the template dropdown (Default)

Parameter present, Correct Value

parameter present

Yes

Preview Tab with only the supplied template and 'open in new window' (true or false)

Parameter present, Incorrect Value

parameter present

No

Hide Preview Tab

Parameter not present

parameter not present

Yes

Preview Tab with the template dropdown (Default)

Parameter present, Correct Value

parameter not present

Yes

Preview Tab with only the supplied template and 'open in new window' visible

Parameter present, Incorrect Value

parameter not present

No

Hide Preview Tab

images/s/en_GB/7502/03f55dd28656fecb49cdf79d0ae052058a20a5d2/_/images/icons/emoticons/warning.png Invalid templateName will lead to a log entry.

NOTE

  • If same parameter is mentioned multiple times in one tab, then values will be overwritten by the last one.