Layout Blocks - System Accessors

 

The accessors are Layout Block configurations that are used to describe the content and to connect to specific data structures (textual suggestions, pagination, etc) and sources (widgets).

When designing the Layout Blocks, use accessor to extend the functionality of the section, as described bellow:

 

Property

Value

Description

Property

Value

Description

1

bx-hits

accessor

Indicates that the block is receiving a collection of data(ex: product, content, etc - based on the WPO logic);
In the API response, expect a structure like:
”bx-hits":{"totalHitCount": XXX} to indicate the size of the collection.

2

bx-hit

accessor

Indicates the return of an item from the collection. As a practice, the Layout Block with this property is a child of the Layout Block that has bx-hits: accessor property.
The Layout Block will have a property "bx-hit":{"score":<index-reco-score>, "id":"<content id>", ..}" . In the bx-hit node, all the returnFields from the API request are returned.

3

bx-acQueries

accessor

Indicates that the blocks is accessing the autocomplete queries (search suggestions) collection.

In the API response, expect a structure like:
"bx-acQueries":{"totalHitCount": XXX} to indicate the nr of available search suggestions (for the search term).

4

bx-acQuery

accessor

Indicates that the blocks is accessing the autocomplete query (search suggestion) item.

5

bx-pagination

accessor

Indicates that the pagination information is to be included as part of the API response.
As a consequence, the bx-pagination object is included in the API request, at the level of the Layout Block: "bx-pagination": { "totalHitCount": X, "offset": 0, "pageSize": Y }

This element can be used for navigation on the page (search, listing)

6

bx-sort

accessor

Indicates that the sorting information is to be included as part of the API response.
As a consequence, the bx-sort object is included in the API request, at the level of the Layout Block: "bx-sort": [{ "field": "discountedPrice", "reverse": true }]

7

bx-hitCounts

accessor

 

8

accessor

<widget_name>

The content (ex: collection) of the block are coming from an API call to the <widget_name> WPO.

** More details on https://boxalino.atlassian.net/wiki/spaces/BPKB/pages/283705356

9

 

<widget_name>|hitCount=X

The content (ex: collection) of the block has size hitCount and originates from an API call to the <widget_name> WPO.

** More details on https://boxalino.atlassian.net/wiki/spaces/BPKB/pages/283705356

10

 

$.responses[0].propertyResults['<property_name>']^

The content of the children blocks are the content of property matches for property-name (ex: brand, categories, etc)

11

 

$.responses[0].SEARCH_TERM_TRENDS[hitCount=4]^

The content of the children blocks are suggestions based of the active searching trends for the account.

12

 

$.responses[0].PERSONALIZED_SEARCH_SUGGESTIONS[hitCount=4]^

The content of the children blocks are suggestions based of the personalized suggestions for the user.