The Link Builder editor allows the content administrator to specify a link to a static page, a single selected record, or a navigation state.
The Link Builder uses the Select Records dialog to enable the content administrator to browse to a single record or a particular navigation state in the data set (which may include search terms, dimension refinements, or a combination of both). Alternately, the Link Builder also supports entering an absolute URL to a static resource.
To add a Link Builder to a template:
Insert an
Item
property namedlink
, of classcom.endeca.infront.cartridge.model.LinkBuilder
, as in the following example:<Property name="link"> <Item class="com.endeca.infront.cartridge.model.LinkBuilder" xmlns="http://endeca.com/schema/xavia/2010"> </Item> </Property>
Within the
Item
property, insert three emptyProperty
elements namedpath
,linkType
, andqueryString
:<Property name="link"> <Item class="com.endeca.infront.cartridge.model.LinkBuilder" xmlns="http://endeca.com/schema/xavia/2010"> <Property name="path"></Property> <Property name="linkType"></Property> <Property name="queryString"></Property> </Item> </Property>
These properties are populated by the Select Records dialog and processed by the cartridge handler into an action string.
Insert a corresponding
<editors:LinkBuilderEditor>
element within<BasicContentItemEditor>
.Specify the
propertyName
attribute for the editor:<editors:LinkBuilderEditor propertyName="link" enabled="true"/>
Specify any additional label attributes for the editor:
<editors:LinkBuilderEditor propertyName="link" label="Link Destination" enabled="true"/>
The following shows an example of a template that includes a link builder editor:
<ContentTemplate xmlns="http://endeca.com/schema/content-template/2008" xmlns:editors="editors" xmlns:xavia="http://endeca.com/schema/xavia/2010" type="MainContent"> <!-- additional elements omitted from this example --> <ContentItem> <Name>Media banner</Name> <!-- additional elements omitted from this example --> <Property name="link"> <Item class="com.endeca.infront.cartridge.model.LinkBuilder" xmlns="http://endeca.com/schema/xavia/2010"> <Property name="path"></Property> <Property name="linkType"></Property> <Property name="queryString"></Property> </Item> </Property> <!-- additional elements omitted from this example --> </ContentItem> <EditorPanel> <BasicContentItemEditor> <!-- additional elements omitted from this example --> <GroupLabel label="Link Settings"/> <editors:LinkBuilderEditor propertyName="link" label="Link Destination" enabled="true"/> <!-- additional elements omitted from this example --> </BasicContentItemEditor> </EditorPanel> </ContentTemplate>
The Link Builder must be configured with a path to a data service in order to display the Select Records dialog.
Below is the configuration for the Link Builder in the editor configuration
file for the Discover Electronics reference application, located at
<app
dir>\config\import\configuration\tools\xmgr\editors.xml
:
<?xml version="1.0" encoding="UTF-8"?> <!-- additional elements removed from this example --> <EditorConfig xmlns="http://endeca.com/schema/editor-config/2010"> <EditorModule url="/ifcr/tools/pbx/modules/editors.swf"> <!-- additional elements removed from this example --> <Editor name="editors:LinkBuilderEditor"> <EditorConfig resourcePath="/configuration/tools/xmgr/services/endecaBrowserService.json" /> </Editor> <!-- additional elements removed from this example --> </EditorModule> <GlobalEditorConfig></GlobalEditorConfig> </EditorConfig>
To publish and view changes to the editor configuration file, run the
<app dir>\control\set_editors_config
script
and clear your browser cache.
The Link Builder formerly supported multiple nested configuration properties that applied to all instances of the editor in an application. This configuration model is deprecated in the current release:
Property |
Description |
---|---|
|
The hostname or IP address of the MDEX Engine server to use for the Select Records dialog. |
|
The port on which the specified MDEX Engine server listens. |
|
The name of the property that serves as the record spec in the data set. This must be a unique identifier. |
|
The name of a property, dimension, or search interface against which searches are performed. |
|
The rollup key (used for aggregated records) to apply to all queries made via this MDEX. |
|
The match mode to use for text searches.
Valid values for this property follow the syntax of URL parameters for search
mode, without the
|
|
The property that specifies the location of the thumbnail image for a record. |
|
A comma separated list of record properties that display for each record returned by the content administrator's search and navigation state in the link builder Assembler application. |
Specifying a path to a data service overrides these settings.