AnnouncementBanner
An AnnouncementBanner is a mostly small banner that shows different AnnouncementBannerItems inside of it, that are sliding through the AnnouncementBanner.
Hence one AnnouncementBanner can contain n AnnouncementBannerItems
When an AnnouncementBanner contains only on AnnouncementBannerItem child, no actual slider is rendered but a static DOM element is used.
Structure example
Take a look at the example, to further understand the possibilities, of how an AnnouncementBanner can be structured. The examples focus on the AnnouncementBannerItems and not the container itself, as the banner is only responsible for properly wrapping the content. This example shows a possible version of a AnnouncementBanner with atleast one AnnouncementBannerItem.
{
"textItems":[
{
"requiredDisplayTitle":{
"content":"No Link",
"size":"sm",
"weight":"bold",
"classification":"sans"
},
"displayDescription":{
"content":"desc",
"size":"base",
"weight":"normal",
"classification":"sans"
}
},
{...}
],
"styleOptions":{
"slideDuration":1500,
"size":"medium",
"isSticky":false
}
}Create
POST _apiBaseUrl/v1/cms/banner/announcementCode
CreateAnnouncementBannerDto{
"textItems":[
{
"requiredDisplayTitle":{
"content":"Everything",
"size":"sm",
"weight":"bold",
"classification":"sans"
},
"displayDescription":{
"content":"desc",
"size":"base",
"weight":"normal",
"classification":"sans"
},
"displayLink":{
"url":"https://www.shophub.de",
"displayText":"text",
"descriptiveText":"desc text"
}
},
{
"requiredDisplayTitle":{
"content":"Only Title",
"size":"sm",
"weight":"bold",
"classification":"sans"
}
},
{
"requiredDisplayTitle":{
"content":"No Link",
"size":"sm",
"weight":"bold",
"classification":"sans"
},
"displayDescription":{
"content":"desc",
"size":"base",
"weight":"normal",
"classification":"sans"
}
},
{
"requiredDisplayTitle":{
"content":"Title and link",
"size":"sm",
"weight":"bold",
"classification":"sans"
},
"displayLink":{
"url":"https://www.shophub.de"
}
}
],
"styleOptions":{
"slideDuration":1500,
"size":"medium",
"isSticky":false
}
}Arguments
A list of all announcement banner items (slider items), associated to the annoucement banner.
A required title, that is displayed at the top inside the item.
An optional description, that is displayed below the title of the item.
An optional link, that is displayed next to the description or just below the title, if no description is set.
Optional style options to further customize the funnel block.
Defines the duration on how long a slide is shown until the slider moves on.
Defines the height of the banner.
Defines if the banner should be sticky. (Sticks to the top of the screen, once scrolled out of view.)