Skip to content

Storing presentational information

Presentational information is data that isn't intended to be used in search, filters or facets, e.g. data that is used by the frontend code to render a part of a page.

The recommendation is to keep this kind of data out of Elevate since it increases the response size and might cause strange search hits. However, it might not always be possible to omit this kind of information because of the difficulty of getting data from other system.

Products and variants

If this type of data needs to be stored in products or variants in Elevate, it should be stored as a JSON blob, as it will NOT be indexed. Group related data together in an attribute to minimize the number of attributes and store only the necessary information. The json blob should be stored as a custom attribute in Admin v3 or as a custom json field in Admin v4.

The custom attribute or custom json field will be returned in a product-page request and can be included in listings via presentCustom or by using a template that includes that attribute or field.

Example

The following examples shows a variables that control the UI on a product page showPDPBanner, and also an internalId that shouldn't be searchable. If internalId was stored as a regular custom attribute and another custom attribute contained a value with cm e.g. 55 cm, a search for 15 cm would result in the product being listed.

Admin v3
<!-- on product or variant -->
<custom_attributes>
    <display_information>{"showPDPBanner": true, "internalId": 15}</display_information>
</custom_attributes>
Admin v4
// on ProductData and VariantData
{
    "customJson": {
        "displayInformation": { 
            "showPDPBanner": true,
            "internalId": 15
        }
    }
}

Landing pages

If there is presentational information related to a category, it can be saved on the field customData for each locale on a page.

The customData field will be returned on landing-page requests.

Example

Page import with presentational data
{
    "market" : "se",
    "type" : "FULL",
    "addOrUpdate" : [ {
        "id" : "/women/shirts",
        "customData" : {
            "en-GB" : {
                "showBanner": true,
                "showBannerExpanded": true,
                "bannerImage" : "/assets/banners/sale_01.jpg"
            },
            "sv-SE": {
                "showBanner": true,
                "showBannerExpanded": false,
                "bannerImage" : "/assets/banners/sale_01.jpg"
            }
        }
  } ]
  //.. omitted for brevity
}

If the nodes in the navigation require presentational information it can be stored on the field customData. The customData field will be returned on landing-page requests as well as requests to the navigation-tree.

Example

Navigation import with presentational data
{
  "locale" : "sv-SE",
  "market" : "se",
  "type" : "FULL",
  "addOrUpdate" : [ {
    "id" : "/women/shirts",
    "title" : "Shirts",
    "type" : "PAGE",
    "customData" : {
      "highlight" : "true",
      "viewableFrom" : "2010-10-20 00:00:00"
    },
    //.. omitted for brevity
  } ]
}
×
Copyright

This online publication is intellectual property of Voyado Lund AB. Its contents can be duplicated in part or whole, provided that a copyright label is visibly located on each copy and the copy is used in conjunction with the product described within this document.

All information found in these documents has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither Voyado Lund AB nor the authors shall be held liable for possible errors or the consequences thereof.

Software and hardware descriptions cited in these documents might be registered trademarks. All trade names are subject to copyright restrictions and may be registered trademarks. Voyado Lund AB essentially adheres to the manufacturer’s spelling. Names of products and trademarks appearing in this document, with or without specific notation, are likewise subject to trademark and trade protection laws and may thus fall under copyright restrictions.

CLOSE