Skip to main content

List

Supported products
  • Central CMS
  • Central Forms
  • Central Connect

Pass an array of items and have them rendered as a simple unordered or ordered list, this is particularly useful when chained with other helpers.

Lists are purposely left unstyled, but you can use block lists if you need nicer styling.

  • foo
  • bar

Basic usage​

{{
html.list({
'items': [
'foo',
'bar'
]
})
}}

Helper options​

You can configure this helper using the common helper options, the following options are specific to this helper.

OptionTypeDescription
active_itemintThe index of the active item, will have the is-active class applied
itemshashA hash of items to display as list items
typestringMarkup scheme to use: ul (default), ol, div or link

Setting the active item​

The list items are indexed by one, you can pass the index of the item you would like to be marked as active and it will have the .is-active class applied. You will need to style this active class yourself.

{{
html.list({
'active_item': 2,
'items': [
'foo',
'bar'
]
})
}}