Developers

Related

Overview

This subcomponent is defined to show the related contents.

Usage

This component is located inside the content component, where it is disabled. To show related content, set the option showRelated to true in the content component. For details, see the example below.

Sample

By default, this component looks like this:

Options

This component does not have optional parameters.

Methods

This subcomponent does not have any methods.

Subcomponents

This component has some components inside which can be configured. This components are:

Name Description
ratings Component to render the ratings

Events

This subcomponent does not have any events.

Tracking

This component calls the API endpoint /tracking/events to register a click event when a user clicks on a content.

Labels

Labels of this component. The default labels of each component can be rewritten in the SDK creation configuration.

Name Default Description
RELATED_INTRODUCTION Related contents HTML related introduction

Example

Create popular with related.

sdk.component('popular', '#popular', {
  contents: {
    showRelated: true,
  }
});