<f:comment>
    Styling requires the colpos to be set to the string 'unused'. To preserve type safty in the
    controller, the string is only used in the template by setting the below "colpos" variable.
</f:comment>
<f:variable name="colpos" value="{f:if(condition: column.unused, then: 'unused', else: column.columnNumber)}"/>

<td valign="top" colspan="{column.colSpan}" rowspan="{column.rowSpan}"
    data-colpos="{colpos}" data-language-uid="{column.context.siteLanguage.languageId}"
    class="t3js-page-lang-column-{column.context.siteLanguage.languageId} t3js-page-column t3-grid-cell t3-page-column t3-page-column-{colpos}
        {f:if(condition: column.unassigned, then: 't3-grid-cell-unassigned')}
        {f:if(condition: '!{column.active} && !{column.unused}', then: 't3-grid-cell-restricted')}
        {f:if(condition: '!{column.active} && {hideRestrictedColumns} && !{column.unused}', then: 't3-grid-cell-hidden')}
        t3-gridCell-width{column.colSpan}
        t3-gridCell-height{column.rowSpan}">
    <f:render partial="PageLayout/Grid/ColumnHeader" arguments="{_all}" />
    <f:if condition="{column.active} || {column.unused}">
        <div data-colpos="{colpos}" data-language-uid="{column.context.siteLanguage.languageId}"
            class="t3js-sortable t3js-sortable-lang t3js-sortable-lang-{column.context.siteLanguage.languageId} t3-page-ce-wrapper
            {f:if(condition: column.items, else: 't3-page-ce-empty')}">
            <f:for each="{column.items}" as="item">
                <f:render partial="PageLayout/Record" arguments="{_all}" />
            </f:for>
        </div>
    </f:if>
    <f:format.raw>{column.afterSectionMarkup}</f:format.raw>
</td>
