Table

<!-- ### Begin: Element table ### -->
<div id="c649" class="frame frame-default frame-type-table frame-layout-0 frame-background-none frame-no-backgroundimage frame-space-before-none frame-space-after-none">
    <div class="frame-container">
        <div class="frame-inner">
            <div class="table-responsive">
                <table class="table table-striped">
                    <caption>Caption</caption>
                    <tbody>
                        <tr>
                            <td> Title 1 </td>
                            <td> Title 2 </td>
                            <td> Title 3 </td>
                        </tr>
                        <tr>
                            <td> Row 1 </td>
                            <td> Row 1 </td>
                            <td> Row 1 </td>
                        </tr>
                        <tr>
                            <td> Row 2 </td>
                            <td> Row 2 </td>
                            <td> Row 2 </td>
                        </tr>
                        <tr>
                            <td> Row 3 </td>
                            <td> Row 3 </td>
                            <td> Row 3 </td>
                        </tr>
                        <tr>
                            <td> Row 4 </td>
                            <td> Row 4 </td>
                            <td> Row 4 </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<!-- ### End: Element table ### -->
{% extends '@wrapper-frame' %}

{% set CType = 'table' %}

{% import _self as section %}

{% macro columns(cell,rowIteratorFirst,rowIteratorLast,columnIteratorFirst, table_header_position) %}
    {% spaceless %}
    {% if rowIteratorFirst %}
        {% if table_header_position == 1 %}
            <th>
        {% else %}
            {% if columnIteratorFirst %}
                {% if table_header_position == 2 %}
                    <th>
                {% else %}
                    <td>
                {% endif %}
            {% else %}
                <td>
            {% endif %}
        {% endif %}
    {% else %}
        {% if columnIteratorFirst %}
            {% if table_header_position == 2 %}
                <th>
            {% else %}
                <td>
            {% endif %}
        {% else %}
            <td>
        {% endif %}
    {% endif %}
    {% endspaceless %}
    {% spaceless %}

    {% if cell %}
        {% include template_from_string(cell) %}
    {% else %}
        &nbsp;
    {% endif %}

    {% endspaceless %}
    {% if rowIteratorFirst %}
        {% if table_header_position == 1 %}
            </th>
        {% else %}
            {% if columnIteratorFirst %}
                {% if table_header_position == 2 %}
                    </th>
                {% else %}
                    </td>
                {% endif %}
            {% else %}
                </td>
            {% endif %}
        {% endif %}
    {% else %}
        {% if columnIteratorFirst %}
            {% if table_header_position == 2 %}
                </th>
            {% else %}
                </td>
            {% endif %}
        {% else %}
            </td>
        {% endif %}
    {% endif %}
{% endmacro %}

{% block main %}
    {% include "@atom-header" %}
    {% if table %}
        <div class="table-responsive">
            <table class="table{% if table_class %} table-{{ table_class }}{% endif %}">
                {% if table_caption %}
                    <caption>{{ table_caption }}</caption>
                {% endif %}
                {% for row in table %}
                    {% set rowIteratorFirst = loop.first %}
                    {% set rowIteratorLast = loop.last %}
                    {% if rowIteratorFirst %}
                        {% if table_header_position == 1 %}
                            <thead>
                        {% else %}
                            <tbody>
                        {% endif %}
                    {% elseif rowIteratorLast %}
                        {% if table_tfoot %}
                            </tbody>
                            <tfoot>
                        {% endif %}
                    {% endif %}
                    <tr>
                        {% spaceless %}
                        {% for cell in row %}
                            {% set columnIteratorFirst = loop.first %}
                            {{ section.columns(cell,rowIteratorFirst,rowIteratorLast,columnIteratorFirst,   table_header_position) }}
                        {% endfor %}
                        {% endspaceless %}
                    </tr>
                    {% if rowIteratorFirst %}
                        {% if table_header_position == 1 %}
                            </thead>
                            <tbody>
                        {% endif %}
                    {% elseif rowIteratorLast %}
                        {% if table_tfoot %}
                            </tfoot>
                        {% else %}
                            </tbody>
                        {% endif %}
                    {% endif %}
                {% endfor %}
            </table>
        </div>
    {% endif %}
{% endblock %}
{
  "bodytext": null,
  "categories": null,
  "CType": null,
  "customId": null,
  "date": null,
  "frame_class": null,
  "header": null,
  "header_color": null,
  "header_layout": 2,
  "header_link": null,
  "header_position": null,
  "header_style": null,
  "layout": null,
  "space_after_class": null,
  "space_before_class": null,
  "space_inner_after_class": null,
  "space_inner_before_class": null,
  "subheader": null,
  "target": null,
  "table_caption": "Caption",
  "table_class": "striped",
  "table_header_position": null,
  "table_tfoot": null,
  "table": [
    [
      "Title 1",
      "Title 2",
      "Title 3"
    ],
    [
      "Row 1",
      "Row 1",
      "Row 1"
    ],
    [
      "Row 2",
      "Row 2",
      "Row 2"
    ],
    [
      "Row 3",
      "Row 3",
      "Row 3"
    ],
    [
      "Row 4",
      "Row 4",
      "Row 4"
    ]
  ]
}

No notes defined.