Metadata
Supported products
- Central CMS
- Central Forms
- Central Connect
Provides a simple way to mark up key/value information provided by a Twig hash or JSON object.
Basic usage
- Twig
- HTML
{{
html.metadata({
'items': {
'File': 'true_lies.avi',
'Size': '1.2 Gb',
'Type': 'Video'
}
})
}}
<dl class="metadata">
<dt class="metadata__key">File</dt>
<dd class="metadata__value">true_lies.avi</dd>
<dt class="metadata__key">Size</dt>
<dd class="metadata__value">1.2 Gb</dd>
<dt class="metadata__key">Type</dt>
<dd class="metadata__value">Video</dd>
</dl>
Helper options
You can configure this helper using the common helper options, the following options are specific to this helper.
Option | Type | Description |
---|---|---|
items | hash | A hash of items formatted as { 'key': 'value' } , both will be displayed |