{# ========================================================================== Expandable ========================================================================== Description: Create an Expandable molecule when given: value: Object defined from a StreamField block. value.label: Label you want on the Expandable. Default is an empty string. value.paragraph: Intro paragraph text. value.content: Main content of the expandable. value.is_bordered: Whether the Expandable has a bottom border or not. Default is true. value.is_midtone: Whether the Expandable is gray or not. Default is false. value.is_expanded: Whether the Expandable is expanded or not. Default is false. ========================================================================== #} {% macro expandable(value) %}
{% if caller is defined %} {{ caller() }} {% else %} {% for block in value.content %} {% if 'paragraph' in block.block_type %} {{ parse_links(block.value) |safe}} {% else %} {{ render_stream_child(block) }} {% endif %} {% endfor %} {% endif %}
{% endmacro %} {% if value %} {{ expandable(value) }} {% endif %}