close

Filter

loading table of contents...

Frontend Developer Manual / Version 2310

Table Of Contents

6.3.1 Default-Teaser

The default-teaser brick provides templates and basic CSS styles for default teasers. Templates exist for all kinds of CMTeasable and as special variants for certain other types, such as Commerce Objects, Pictures, Downloads etc.

Using the Brick

As shown in the example below, a default teaser can be displayed by including the corresponding content type with the teaser view. You can also pass additional CSS classes as parameters to apply custom styling to your default teasers.

  <@cm.include self=self view="teaser"/>
  

The teaser view template works with all types and subtypes of type com.coremedia.blueprint.common.contentbeans.CMTeasable. The following special views exist:

  • CategoryInSite.teaser.ftl

  • CMDownload.teaser.ftl

  • CMGallery.teaser.ftl

  • CMHTML.teaser.ftl

  • CMPicture.teaser.ftl

  • CMSpinner.teaser.ftl (part of the 360-Spinner Brick)

  • CMTeasable.teaser.ftl

  • LiveContextExternalChannel.teaser.ftl

  • LiveContextProductTeasable.teaser.ftl

  • ProductInSite.teaser.ftl

To configure the behavior of the template you can add the following parameters to the cm.include tag:

Parameter Type Default Description
blockClass String "cm-teasable" A base name that will be used for CSS classes attached to the elements rendered by the template.
additionalClass String "" An additional CSS class that will be added to the outer div of the teaser.
islast Boolean false Set to true to add a "is-true" CSS class to the teaser.
renderLink Boolean true Per default, the whole teaser is clickable and will work as a link. Set to false to only use embedded call-to-action buttons as links.
renderTeaserTitle Boolean true Whether to display the teaser title or not.
renderTeaserText Boolean true Whether to display the teaser text or not.
renderAuthors Boolean false Whether to display the list of linked authors. Will only be displayed if authors exist for this content.
renderDate Boolean false Whether to display the date. Will only be displayed if a date exists for this content.
renderEmptyImage Boolean true Whether to display an empty media element if no media has been linked or not.

Table 6.9. Parameters of Teasers


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.