Banners

The banner templates use a JSON source as banner data. Its form is:

  • name
  • minHeight
  • banners (array of:)
    • imageLink
    • background
    • color
    • header
    • meta
    • description
    • action
    • link
    • subaction
    • sublink

The most common way to use it would be the marker-jason macro {@marker-json:tmpl-root:template:repository-file}, where tmpl-root is files, template can be bannerImage or bannerCard, and repository-file would be the location of the JSON file.

In the example will be using the banners.json file, located at this context's repository.

With {@marker-json:files:bannerImage:*/banners.json} you get:

Some header
Sub header

Lorem Ipsum is simply dummy text of the printing and typesetting industry...

Some other header
Some header support

Lorem Ipsum is simply dummy text of the printing and typesetting industry...

With {@marker-json:files:bannerCard:*/banners.json} you get:

Some header
Sub header
Lorem Ipsum is simply dummy text of the printing and typesetting industry...
Some other header
Some header support
Lorem Ipsum is simply dummy text of the printing and typesetting industry...

JSON file

{
  "name" : "slider",
  "minHeight" : "400px",
  "banners" : [
    {
      "imageLink" : "banners/_internal/repository/elementals.jpg",
      "background" : "#00000066",
      "color" : "#fff",
      "header" : "Some header",
      "meta" : "Sub header",
      "description" : "Lorem Ipsum is simply dummy text of the printing and typesetting industry...",
      "action" : "Visit...",
      "link" : "#",
      "subaction" : "Or visit...",
      "sublink" : "#"
    },
    {
      "imageLink" : "banners/_internal/repository/emotion-ocean.jpg",
      "background" : "#ffffff66",
      "color" : "#000",
      "header" : "Some other header",
      "meta" : "Some header support",
      "description" : "Lorem Ipsum is simply dummy text of the printing and typesetting industry...",
      "action" : "Visit...",
      "link" : "#"
    }
  ]
} 
Printer version
English07/15/20 10:42Lluís Turró Cutiller
English04/29/21 10:28Lluís Turró Cutiller