Slider
The slider can contain:
- Video.
- Image.
- Link.
YAN ad block.
To add ads to the slider, create an ad block for Turbo pages with display ads disabled.
- In the Yandex Advertising Network, go to thepage.
- Choose a block and click Edit.
- In the Strategy block, set the radio button to Separate CPM.
- Turn on the Set the CPM threshold or blocking for media advertising option and choose a value from the Blocking list.
Disabling the display of media formats
<div data-block="slider" data-view="landscape"> <figure> <video width="192" height="108"> <source src="https://clck.ru/Kiunj" type="video/mp4" data-duration=15 data-title="Sunset"/> </video> img src="https://clck.ru/Kiun7"/> <figcaption>Sunset timelapse</figcaption> </figure> <figure data-turbo-ad-id="first_YAN_ad_place"></figure> <figure> <figcaption>Sunset photo</figcaption> <img src="https://clck.ru/Kiun7"/> </figure> <figure data-turbo-ad-id="second_YAN_ad_place"></figure> </div>
Copied to clipboard
Note. The slider doesn't support GIF animation.
Use the div element with the following attributes:Attribute | Description |
---|---|
data-block * | Takes the slider value. |
data-view | Allows you to set the display of images. Possible values:
|
data-item-view | Possible values:
|
Attribute | Description |
---|---|
data-block * | Takes the slider value. |
data-view | Allows you to set the display of images. Possible values:
|
data-item-view | Possible values:
|
*Required attribute.
Inside the div element, use the following elements:
Element | Description |
---|---|
header | A general title to the whole slider. Displayed if none of the figure elements have captions. |
figure * | Slider element. It can be the YAN ad block, a picture or a link. |
figcaption | Caption for the slider element. |
img | Picture. |
a | Link. |
video | Video block. |
source * | Video clip parameters. |
Element | Description |
---|---|
header | A general title to the whole slider. Displayed if none of the figure elements have captions. |
figure * | Slider element. It can be the YAN ad block, a picture or a link. |
figcaption | Caption for the slider element. |
img | Picture. |
a | Link. |
video | Video block. |
source * | Video clip parameters. |
* Required element.
Attribute | Description |
---|---|
data-turbo-ad-id | Add the ad block position ID specified in the turbo:adNetwork element or on the page. |
Attribute | Description |
---|---|
data-turbo-ad-id | Add the ad block position ID specified in the turbo:adNetwork element or on the page. |
Attribute | Description |
---|---|
width * | Width of the video block. |
height * | Height of the video block. |
Attribute | Description |
---|---|
src * | The video URL. |
type * | The type of video. The supported format is video/mp4. |
data-duration * | The displayed length of the video, integer. |
data-title | The title of the video block. |
*Required attribute.