The Spotlight Selection editor uses the Select Records dialog to enable a content administrator to designate specific records to spotlight in a section, or to specify a query to return a dynamic list of records.

A Spotlight Selection editor is bound to a recordSelection property, which can contain either a list of record IDs (for featured records) or a set of dimension refinements (for dynamic records).

To add a Spotlight Selection editor to a template:

  1. Insert an Item property of class com.endeca.infront.cartridge.RecordSpotlightSelection.

    In the following typeInfo example, this is the recordSelection property:

    "typeInfo": {
            "recordSelection": {"@propertyType": "Item"}
        }

    In the corresponding defaultContentItem example, this is the class:

    "defaultContentItem": {
            "recordSelection": {"@class": "com.endeca.infront.cartridge.RecordSpotlightSelection"}
        },
  2. Insert a String property that stores the maximum number of records to display in the spotlight.

    In the following typeInfoexample, this is the maxNumRecords property:

    "typeInfo": {
            "maxNumRecords": {"@propertyType": "String"},
            "recordSelection": {"@propertyType": "Item"},
            }

    In the corresponding defaultContentItem example, this is the maxNumRecords:

    "defaultContentItem": {
            "maxNumRecords": "10",
            "recordSelection": {"@class": "com.endeca.infront.cartridge.RecordSpotlightSelection"}
        },
  3. Insert a Boolean property that controls the display of the "See All" link.

    In the following typeInfoexample, this is the showSeeAllLink property:

    "typeInfo": {
            "maxNumRecords": {"@propertyType": "String"},
            "recordSelection": {"@propertyType": "Item"},
            "showSeeAllLink": {"@propertyType": "Boolean"},
            }

    In the corresponding defaultContentItem example, this is the showSeeAllLink:

    "defaultContentItem": {
            "maxNumRecords": "10",
            "showSeeAllLink": false,
            "recordSelection": {"@class": "com.endeca.infront.cartridge.RecordSpotlightSelection"}
        },
  4. Insert a String property to contain the text for the "See All" link.

    In the following typeInfo example, this is the seeAllLinkText property:

    "typeInfo": {
            "maxNumRecords": {"@propertyType": "String"},
            "recordSelection": {"@propertyType": "Item"},
            "seeAllLinkText": {"@propertyType": "String"},
            "showSeeAllLink": {"@propertyType": "Boolean"}
         }
    

    In the corresponding defaultContentItem example, this is the seeAllLinkText:

    "defaultContentItem": {
            "@name": "Spotlight Records",
            "maxNumRecords": "10",
            "seeAllLinkText": "",
            "showSeeAllLink": false,
            "recordSelection": {"@class": "com.endeca.infront.cartridge.RecordSpotlightSelection"}
        },
  5. Insert an editors/SpotlightSelectionEditor element within editors/DefaultEditorPanel.

  6. Specify label attributes and map the editor to the associated properties:


Copyright © Legal Notices