meta_items
prop, each item is visually separated by a pipe.description
prop. It will appear below the meta data. Truncating with an ellipsis and a read more button is optional.warning
prop. It will appear below the description. A warning icon is appended at the start.// Render description and warning
{% set description %}
{% set more_link %}
{% set icon_chevron_right %}
{% include '@bolt-elements-icon/icon.twig' with {
name: 'chevron-right',
} only %}
{% endset %}
{% include '@bolt-elements-text-link/text-link.twig' with {
content: 'Read more',
icon_after: icon_chevron_right,
attributes: {
href: 'https://pega.com',
}
} only %}
{% endset %}
<p>This is the description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus…{{ more_link }}</p>
{% endset %}
{% set warning %}
<p>Warning! This is a warning message.</p>
{% endset %}
// Pass meta data, warning, and description to the component
{% include '@bolt-components-listing-teaser/listing-teaser.twig' with {
headline: {
text: 'This listing has meta data and more info',
tag: 'h3',
size: 'large',
link_attributes: {
href: 'https://pega.com'
},
},
meta_items: [
'Posted by <a href="https://collaborate.pega.com" class="e-bolt-text-link e-bolt-text-link--reversed-underline">username</a> on May 21, 2020',
'Last activity: 2 minutes ago',
],
description: description,
warning: warning,
} only %}