Streamline product teaser rendering

This commit is contained in:
Björn Fromme
2022-03-19 10:01:44 +01:00
parent a7f188f0f9
commit d9d7546dc5
@@ -6,18 +6,25 @@
<f:section name="Main">
<f:if condition="{teaser.dates}">
<f:switch expression="{data.layout}">
<f:case value="2">
{f:variable(name: 'partial', value: 'Product/TeaserLandscape')}
</f:case>
<f:case value="3">
{f:variable(name: 'partial', value: 'Product/TeaserLandscape')}
</f:case>
<f:defaultCase>
{f:variable(name: 'partial', value: 'Product/Teaser')}
</f:defaultCase>
</f:switch>
<f:render partial="{partial}" section="Teaser" arguments="{teaser: teaser, slug: teaser.product.slug}"/>
<f:render partial="Product/Teaser"
section="Teaser"
arguments="{
concept: teaser.concept,
hotel: teaser.hotel,
product: teaser.product,
country: teaser.country,
region: teaser.region,
productImage: teaser.product.images.original.0,
nights: teaser.nights,
board: teaser.board,
minPrice: teaser.minPrice,
daytrip: teaser.daytrip,
season: teaser.season,
forceHotelUid: teaser.forceHotelUid,
dateFrom: dateFrom,
dateTo: dateTo,
landscape: '{f:if(condition: \'{data.layout} == 2 || {data.layout} == 3\', then: 1, else: 0)}'
}"/>
</f:if>
</f:section>