feat: render included services conditionally in product teaser
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<html data-namespace-typo3-fluid="true" lang="en"
|
<html data-namespace-typo3-fluid="true" lang="en"
|
||||||
xmlns="http://www.w3.org/1999/xhtml"
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
|
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
|
||||||
|
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
|
||||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
||||||
|
|
||||||
<f:section name="Teaser">
|
<f:section name="Teaser">
|
||||||
@@ -70,6 +71,7 @@
|
|||||||
</f:section>
|
</f:section>
|
||||||
|
|
||||||
<f:section name="TeaserContent">
|
<f:section name="TeaserContent">
|
||||||
|
{f:variable(name: 'including', value: '{f:render(section: \'Including\', arguments: \'{_all}\') -> v:format.trim()}')}
|
||||||
<a href="{ep:uri.product(forceHotelUid: forceHotelUid, product: product, hotel: hotel, dateFrom: dateFrom, dateTo: dateTo)}{f:if(condition: referringPageUri, then: '?ref={referringPageUri -> f:format.urlencode()}')}"
|
<a href="{ep:uri.product(forceHotelUid: forceHotelUid, product: product, hotel: hotel, dateFrom: dateFrom, dateTo: dateTo)}{f:if(condition: referringPageUri, then: '?ref={referringPageUri -> f:format.urlencode()}')}"
|
||||||
title="{region.name} {product.name} Details und Buchen"
|
title="{region.name} {product.name} Details und Buchen"
|
||||||
class="flex-1 flex flex-col space-y-1 px-2 py-4 md:p-4">
|
class="flex-1 flex flex-col space-y-1 px-2 py-4 md:p-4">
|
||||||
@@ -80,26 +82,13 @@
|
|||||||
{region.name}
|
{region.name}
|
||||||
</div>
|
</div>
|
||||||
<div class="product-teaser__label-included">
|
<div class="product-teaser__label-included">
|
||||||
{ep:nightsOptions(options: nights, daytrip: daytrip)} inkl.
|
{ep:nightsOptions(options: nights, daytrip: daytrip)}{f:if(condition: including, then: ' inkl.')}
|
||||||
</div>
|
</div>
|
||||||
<ul class="product-teaser__list-included flex-1 list-none m-0 text-zinc-800 divide-y divide-zinc-400">
|
<f:if condition="{including}">
|
||||||
<li class="flex items-center space-x-1 py-1">
|
<ul class="product-teaser__list-included flex-1 list-none m-0 text-zinc-800 divide-y divide-zinc-400">
|
||||||
{ep:icon(class: 'w-6 h-6 text-ep-primary-light', icon: 'check')}
|
{including -> f:format.raw()}
|
||||||
<span class="block flex-1 leading-none">{f:if(condition: '{season} == "s"', then: 'Bergbahnticket', else: 'Skipass')}</span>
|
</ul>
|
||||||
</li>
|
</f:if>
|
||||||
<f:if condition="{product.feature}">
|
|
||||||
<li class="flex items-center space-x-1 py-1">
|
|
||||||
{ep:icon(class: 'w-6 h-6 text-ep-primary-light', icon: 'check')}
|
|
||||||
<span class="block flex-1 leading-tight">{product.feature}</span>
|
|
||||||
</li>
|
|
||||||
</f:if>
|
|
||||||
<f:if condition="{board} != '' && {board} != 'keine Verpflegung'">
|
|
||||||
<li class="flex items-center space-x-1 py-1">
|
|
||||||
{ep:icon(class: 'w-6 h-6 text-ep-primary-light', icon: 'check')}
|
|
||||||
<span class="block flex-1 leading-tight">Verpflegung</span>
|
|
||||||
</li>
|
|
||||||
</f:if>
|
|
||||||
</ul>
|
|
||||||
<div class="pt-8">
|
<div class="pt-8">
|
||||||
<div class="bg-button text-white font-bold px-4 py-1 group-hover:bg-button transition-colors">
|
<div class="bg-button text-white font-bold px-4 py-1 group-hover:bg-button transition-colors">
|
||||||
<div class="lg:inline-block">
|
<div class="lg:inline-block">
|
||||||
@@ -113,4 +102,24 @@
|
|||||||
</a>
|
</a>
|
||||||
</f:section>
|
</f:section>
|
||||||
|
|
||||||
|
<f:section name="Including">
|
||||||
|
<f:if condition="{season} == 'w'">
|
||||||
|
<li class="flex items-center space-x-1 py-1">
|
||||||
|
{ep:icon(class: 'w-6 h-6 text-ep-primary-light', icon: 'check')}
|
||||||
|
<span class="block flex-1 leading-none">Skipass</span>
|
||||||
|
</li>
|
||||||
|
</f:if>
|
||||||
|
<f:if condition="{product.feature}">
|
||||||
|
<li class="flex items-center space-x-1 py-1">
|
||||||
|
{ep:icon(class: 'w-6 h-6 text-ep-primary-light', icon: 'check')}
|
||||||
|
<span class="block flex-1 leading-tight">{product.feature}</span>
|
||||||
|
</li>
|
||||||
|
</f:if>
|
||||||
|
<f:if condition="{board} != '' && {board} != 'keine Verpflegung'">
|
||||||
|
<li class="flex items-center space-x-1 py-1">
|
||||||
|
{ep:icon(class: 'w-6 h-6 text-ep-primary-light', icon: 'check')}
|
||||||
|
<span class="block flex-1 leading-tight">Verpflegung</span>
|
||||||
|
</li>
|
||||||
|
</f:if>
|
||||||
|
</f:section>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user