The behavior of the navigation cartridges depends on multiple sources of configuration. The data from these source is combined into a configuration model within the initialize() method of each associated cartridge handler in the Assembler.

Navigation cartridge configuration falls into the following categories, in ascending order of priority:

Additionally, while it is not represented in the cartridge configuration model, configuration in the MDEX Engine impacts the behavior of the navigation cartridges.

Request-based configuration overrides the cartridge instance configuration, which overrides the cartridge-level defaults, which override default feature behavior configured in the MDEX Engine.

The core cartridges typically consist of a strongly typed configuration model, a response model, and a cartridge handler that processes the configuration model into the response model. By convention, they are named as follows:

For details about the implementations of these classes for specific cartridges, refer to the Assembler API Reference (Javadoc).

You can specify default configuration settings for the navigation cartridges in the reference implementation by adding values to the cartridge handler configuration in the Spring context file.

Cartridge handler configuration (including default configuration values) is specified as part of the Spring context file for the Assembler. In the Discover Electronics application, this is defined in WEB-INF/assembler-context.xml.

You specify the cartridge handler for a specific cartridge by defining a bean whose ID follows the format CartridgeHandler_<CartridgeType>, where the <CartridgeType> is the id of the corresponding cartridge template. For example, the cartridge handler for the Breadcrumbs cartridge is defined in the CartridgeHandler_Breadcrumbs bean. You can map more than one cartridge to the same cartridge handler.

Typically, you specify the default configuration for a cartridge by defining a contentItemInitializer property within the cartridge handler. The value of this property is a bean whose class implements the ContentItemInitializer interface. The core cartridges use the ConfigInitializer class, which provides a default implementation for merging the default, instance, and request-based configuration for a cartridge. Within the contentItemInitializer bean, the defaults property (if defined) must be a bean whose class is a ContentItem representing the cartridge configuration model to use as a default.

For information about the properties available in the configuration model for the core cartridges, refer to the Assembler API Reference (Javadoc) for the relevant configuration model class.

The content administrator can configure each instance of a cartridge using Experience Manager in Workbench. The cartridge instance configuration is passed in as the argument to the initialize() method of the cartridge handler.

You define which aspects of a cartridge are configurable in Workbench via the cartridge template. Typically this is a subset of the properties in the configuration model. The sample templates provided as part of the Discover Electronics application are intended to cover the majority of use cases.

Cartridge templates for the reference application are included in the reference\discover-data\cartridge_templates directory, or <app dir>\config\cartridge_templates directory for a deployed application.

You can customize the templates for the core cartridges by adding properties to a template in addition to those required by the configuration model. These additional properties can either be processed by a custom cartridge handler implementation or passed through directly to the response model. Some of the templates in the Discover Electronics application define pass-through properties; these are described in the sections on the specific cartridges.

For details about configuring properties and editors in a cartridge template, refer to the "Template Property and Editor Reference" appendix in this guide.


Copyright © Legal Notices