Custom items
Custom items are items that can be added to a section but are not assets. They are listed in the additionalItems
property of a section and will contain the following properties:
type
position
index
target
title
description
images
textPlacement
Currently we only support image
as the type
of the custom item.
Rendering
The idea behind custom items is that they're rendered in the same height as all other items in the section.
TODO: Add illustrative images
Placement
With the item you receive a position
& index
property. The position
property dictates where the custom item should be placed, possible values are:
start
- Always place at the start of the sectionmiddle
- Place somewhere inbetween the assets of the sectionend
- Always place at the end of the section (after all items have been loaded)
In case the position
is middle
the property index
will be filled & give you the index where to render the item, so when index
is set to 3
the item should be rendered instead of the 4th asset from the playlist response (the index is zero-based), the 4th item will then shift to the 5th position and so forth.
Currently the CMS only supports setting these items at the start and so only start
will ever be returned as the position
value
Content
In order to render the custom item we give you a title, description & image. The image is guaranteed to be there, but the title & description are only available when textPlacement
is set to either below
or above
Image
The image follows the same image structure as assets and will be an array, however due to the uncertainty of the sizing we only return the original uploaded image.
Text Placement
When text (and it's placement property) are given the title & description should be placed either on top of the image (when passing above
) or below the image (when passing below
).
Target
The custom item can optionally target a resource in the application or an external resource (website). The target
property contains an object with the following properties:
type
link
The type
will give you the kind of target required and link
will give you an identifier if needed.
The following values are supported for type
:
page
textpage
epg
external
Link
In case type
is set to page
, textpage
, or external
the link
property will be filled with the value needed to retrieve or show the resource.
For page
& textpage
this is set to the ID needed for the pages/{id}
or textPages/{id}
API. For external
this will be a URL to be opened.