<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:bk2k="http://typo3.org/ns/BK2K/BootstrapPackage/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="Main">

    <f:if condition="{records}">
        <div class="icongroup icongroup-align-{data.pi_flexform.align} icongroup-columns-{data.pi_flexform.columns} icongroup-iconposition-{data.pi_flexform.icon_position}">
            <f:for each="{records}" as="item" iteration="iteration">
                <f:render section="LinkWrap" arguments="{link: item.data.link, linkTitle: item.data.header}" contentAs="content">
                    <div class="icongroup-item">
                        <f:if condition="{item.icon}">
                            <div class="icongroup-item-icon">
                                <bk2k:icon icon="{item.icon}" />
                            </div>
                        </f:if>

                        <div class="icongroup-item-text">
                            <h4 class="icongroup-item-text-header">
                               {item.data.header}
                            </h4>

                            <f:if condition="{item.data.subheader}">
                                <p class="icongroup-item-text-subheader">{item.data.subheader}</p>
                            </f:if>

                            <f:if condition="{item.data.bodytext}">
                                <f:format.html>{item.data.bodytext}</f:format.html>
                            </f:if>
                        </div>
                    </div>
                </f:render>
            </f:for>
        </div>
    </f:if>

</f:section>
<f:section name="LinkWrap">

    <f:if condition="{link}">
        <f:then>
            <f:link.typolink parameter="{link}" title="{linkTitle -> f:format.trim()}">
                {content -> f:format.raw()}
            </f:link.typolink>
        </f:then>
        <f:else>
            <span>{content -> f:format.raw()}</span>
        </f:else>
    </f:if>

</f:section>
</html>