Template

The optional template option sets the template being used for rendering the library. It accepts a string value.

/*
 * A very basic usage example, that renders a nested list of each section's shows,
 * each with its formatted date and title.
 */
window.LiSA.library.configs.push({
  template: `
    {{#with sections}}
      <ul>
        {{#each .}}
          {{#with items}}
            <li>
              <ul>
                {{#each .}}
                  <li class="lisa__show" data-lisa-show-id="{{id}}">
                    <a class="lisa__show-cta-play">
                      {{date}} — {{title}}
                    </a>
                  </li>
                {{/each}}
              </ul>
            </li>
          {{/with}}
        {{/each}}
      </ul>
    {{/with}}
  `,
});

Please see Template and Customisations for more information on the LiSA Library default template and how to provide your own library template.

Last updated