LogoLogo
Enterprise GuideCommunity Edition GuideDeveloper Guide
  • Using The Polarity Developer Guide
  • Quick Start
    • What's New
    • Installing Integrations
    • Quick Start Guide
    • Learning Resources
  • Building an Integration
    • Directory Layout
    • package.json
    • Configuration File
    • Integration Main Module
      • startup
      • doLookup
        • Entity Objects
        • Result Objects
        • Error Objects
      • onDetails
      • onMessage
      • validateOptions
    • Customizing the Overlay Window
      • Templates
        • Conditionals
        • Displaying a List of Items
        • Display Object Properties
        • Built-in Helpers
        • Displaying Icons
      • Component File
        • Aliased Properties
        • Computed Properties
        • Event Hooks
      • CSS Styles
    • Vendor Javascript
      • Inserting Javascript into DOM
    • README Guide
    • Debugging Integrations
      • Web Inspector
      • Using Integration Logs
      • Testing Main Module
  • Recipes
    • Enabling User Actions
    • Throttling Lookups
    • Using Custom Entity Types
    • Custom Summary Tags
    • Creating a Tabbed Interface
    • Accessing Username of Requestor
Powered by GitBook
On this page
  1. Building an Integration
  2. Customizing the Overlay Window
  3. Templates

Displaying a List of Items

You can display a list of items using the {{#each}}{{/each}} block helper.

As an example, if your result object contains the following data

{
    entity: entityObj,
    data: {
        summary: ['tag1', 'tag2'],
        details: ['datum1', 'datum2', datum3']
    }
}

You could iterate over the details array with the following

template.hbs
{{#each block.data.details as | item |}}
    {{item}}
{{/each}}

In our example this would create the following HTML

<span>datum1</span><span>datum2</span><span>datum3</span>
PreviousConditionalsNextDisplay Object Properties

Last updated 5 years ago