Files
dialog-relations-website/packages/base/ContentBlocks/ContentElements/imagegallery/templates/backend-preview.html
Dominik Polakovics 37300492dc
All checks were successful
Build / build (push) Successful in 4m21s
Build / deploy-stage (push) Successful in 2m41s
Build / switch-stage (push) Successful in 2m4s
feat: add image gallery content element with configurable columns and backend preview
2025-06-16 13:50:41 +02:00

39 lines
1.3 KiB
HTML

<html
xmlns:be="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
data-namespace-typo3-fluid="true"
>
<f:layout name="Preview"/>
<f:section name="Header">
<be:link.editRecord uid="{data.uid}" table="{data.mainType}">
<f:if condition="{data.header}">
<f:then><strong>{data.header}</strong></f:then>
</f:if>
</be:link.editRecord>
</f:section>
<f:section name="Content">
<f:if condition="{data.image}">
<div class="row">
<f:for each="{data.image}" as="image" iteration="iterator">
<f:if condition="{iterator.index} < 3">
<div class="col-4">
<f:image image="{image}" width="100" height="auto" treatIdAsReference="1" alt="Preview image" />
</div>
</f:if>
</f:for>
</div>
<f:if condition="{data.image -> f:count()} > 3">
<p>+ {f:math.subtract(a: '{data.image -> f:count()}', b: '3')} more images</p>
</f:if>
<p>
<f:switch expression="{data.columns}">
<f:case value="2">2 Columns</f:case>
<f:case value="3">3 Columns</f:case>
<f:case value="5">5 Columns</f:case>
<f:defaultCase>1 Column</f:defaultCase>
</f:switch>
</p>
</f:if>
</f:section>
</html>