close

Filter

loading table of contents...

Frontend Developer Manual / Version 2207

Table Of Contents

6.4.4 Example Detail

The detail brick renders documents in a full page layout. This view is the most detailed, containing the title and text, media elements, a list of authors and related content. The detail brick provides templates, JavaScript, localizations and CSS styles for detail views. Templates exist for all kinds of CMTeasable and as special variants for certain other types, such as Products, Persons, Videos etc.

Detail View

As shown in the example below, a detail view can be displayed by including the corresponding content type with the detail view.

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

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

  • CMAudio.detail.ftl

  • CMGallery.detail.ftl

  • CMPerson.detail.ftl

  • CMProduct.detail.ftl

  • CMVideo.detail.ftl

Using the Brick

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

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

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

  • CMAudio.detail.ftl

  • CMGallery.detail.ftl

  • CMPerson.detail.ftl

  • CMProduct.detail.ftl

  • CMVideo.detail.ftl

  • CMImageMap.detail.ftl (part of the ImageMap brick)

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-details" A base name that will be used for CSS classes attached to the elements rendered by the template.
renderAuthors Boolean true Whether to display the author of the document or not.
renderDate Boolean true Whether to display the date or not.
renderRelated Boolean true Whether to display the related content or not.
renderTags Boolean true Whether to display a list of tags or not.
relatedView String "asRelated" The name of the view to render related content in.

Table 6.13. Parameters of the Detail View


Video Behavior

Videos in the detail view will be displayed inline. You can hide the controls, mute and loop the video or enable autoplay by setting the corresponding video options in CoreMedia Studio. The detail view will not display additional preview pictures linked to the video.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

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