Implement teaser for booking links
This commit is contained in:
@@ -146,6 +146,7 @@ class ProductRepository extends AbstractRepository
|
||||
->select(
|
||||
'product as productUid', 'product_name as productName', 'product_detail_page as productDetailPage',
|
||||
'product_feature as productFeature', 'product_teaser as productTeaser', 'product_fact as productFact',
|
||||
'product_slug as productSlug',
|
||||
'hotel as hotelUid', 'hotel_fact as hotelFact', 'hotel_name as hotelName',
|
||||
'hotel_category as hotelCategory', 'region_fact as regionFact', 'region_name as regionName',
|
||||
'region_feature as regionFeature',
|
||||
|
||||
@@ -235,7 +235,7 @@ class DateImportService implements SingletonInterface
|
||||
SELECT p.uid uid, p.daytrip daytrip, p.important important, p.name product_name,
|
||||
p.searchable product_searchable, p.detail_page product_detail_page, p.keywords product_keywords,
|
||||
p.teaser product_teaser, p.feature product_feature, p.subline product_subline, p.country country,
|
||||
p.region region, p.city city,
|
||||
p.region region, p.city city, p.path_segment slug,
|
||||
cnt.name country_name, cnt.code country_code, cnt.keywords country_keywords, r.name region_name,
|
||||
r.keywords region_keywords, r.feature region_feature, c.name city_name, c.keywords city_keywords,
|
||||
p.concept concept, con.name concept_name, con.code concept_code, con.sorting concept_sorting
|
||||
@@ -342,6 +342,7 @@ class DateImportService implements SingletonInterface
|
||||
'product_feature' => $product['product_feature'],
|
||||
'product_teaser' => $product['product_teaser'],
|
||||
'product_subline' => $product['product_subline'],
|
||||
'product_slug' => $product['slug'],
|
||||
'country' => $product['country'],
|
||||
'country_name' => $product['country_name'],
|
||||
'country_code' => $product['country_code'],
|
||||
|
||||
@@ -204,6 +204,7 @@ class ProductDataService implements SingletonInterface
|
||||
'name' => $teaserData['productName'],
|
||||
'subline' => $teaserData['productSubline'],
|
||||
'detailPage' => $teaserData['productDetailPage'],
|
||||
'slug' => $teaserData['productSlug'],
|
||||
'fact' => $teaserData['productFact'],
|
||||
'feature' => $teaserData['productFeature'],
|
||||
'teaser' => $teaserData['productTeaser'],
|
||||
|
||||
@@ -128,6 +128,7 @@ CREATE TABLE tx_epproducts_domain_model_date
|
||||
product_keywords text NOT NULL,
|
||||
product_teaser text NOT NULL,
|
||||
product_feature varchar(255) DEFAULT '' NOT NULL,
|
||||
product_slug varchar(255) DEFAULT '' NOT NULL,
|
||||
concept int(11) unsigned DEFAULT '0',
|
||||
concept_name varchar(255) DEFAULT '' NOT NULL,
|
||||
concept_code varchar(32) DEFAULT '' NOT NULL,
|
||||
|
||||
+8
-1
@@ -49,8 +49,15 @@ mod {
|
||||
description = Teaser für ein auswählbares Produkt
|
||||
tt_content_defValues.CType = teaser_product
|
||||
}
|
||||
teaser_booking_link {
|
||||
iconIdentifier = content-ep_theme-ce
|
||||
title = Teaser Buchungslink
|
||||
description = Teaser für ein auswählbares Produkt (Buchungslink)
|
||||
tt_content_defValues.CType = teaser_booking_link
|
||||
}
|
||||
}
|
||||
show := addToList(teaser, teaser_country, teaser_region, teaser_city, teaser_hotel, teaser_concept, teaser_product)
|
||||
show := addToList(teaser, teaser_country, teaser_region, teaser_city, teaser_hotel, teaser_concept)
|
||||
show := addToList(teaser_product, teaser_booking_link)
|
||||
}
|
||||
disturber {
|
||||
header = Störer
|
||||
|
||||
@@ -82,6 +82,14 @@ TCEFORM {
|
||||
}
|
||||
}
|
||||
|
||||
layout.types.teaser_booking_link {
|
||||
removeItems = 0,2
|
||||
altLabels {
|
||||
1 = einspaltig
|
||||
3 = mehrspaltig/quer
|
||||
}
|
||||
}
|
||||
|
||||
layout.types.ytvideo {
|
||||
removeItems = 2,3
|
||||
altLabels {
|
||||
|
||||
+24
@@ -89,6 +89,18 @@ call_user_func(function() {
|
||||
'after'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Teaser Buchungslink',
|
||||
'teaser_booking_link',
|
||||
'content-image'
|
||||
],
|
||||
'teaser_concept',
|
||||
'after'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['teaser'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
@@ -229,4 +241,16 @@ call_user_func(function() {
|
||||
',
|
||||
];
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['teaser_booking_link'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
--palette--;Kontext, tx_eptheme_context_product,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
|
||||
layout;' . $frontendLanguageFilePrefix . 'layout_formlabel,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
];
|
||||
|
||||
});
|
||||
|
||||
+2
@@ -27,3 +27,5 @@ tt_content.teaser_concept =< tt_content.teaser_country
|
||||
tt_content.teaser_concept.templateName = TeaserConcept
|
||||
tt_content.teaser_product =< tt_content.teaser_country
|
||||
tt_content.teaser_product.templateName = TeaserProduct
|
||||
tt_content.teaser_booking_link =< tt_content.teaser_product
|
||||
tt_content.teaser_booking_link.templateName = TeaserBookingLink
|
||||
|
||||
@@ -21,12 +21,13 @@
|
||||
</f:link.action>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:link.typolink
|
||||
parameter="{teaser.product.detailPage}"
|
||||
class="teaserbox__flip"
|
||||
title="{teaser.product.name}">
|
||||
<f:variable name="teaserUrl" value="{f:uri.typolink(parameter: teaser.product.detailPage)}"/>
|
||||
<f:if condition="{slug}">
|
||||
<f:variable name="teaserUrl" value="{teaserUrl}{slug}/"/>
|
||||
</f:if>
|
||||
<a href="{teaserUrl}" class="teaserbox__flip" title="{teaser.product.name}">
|
||||
<f:render section="Inner" arguments="{_all}"/>
|
||||
</f:link.typolink>
|
||||
</a>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</div>
|
||||
|
||||
@@ -7,10 +7,13 @@
|
||||
<f:section name="Teaser">
|
||||
<f:if condition="{teaser.forceHotelUid}">
|
||||
<f:then>
|
||||
<v:variable.set name="uriLink" value="{f:uri.action(pageUid: teaser.product.detailPage, action: 'detail', controller: 'Product', arguments: '{product: teaser.product.uid, hotel: teaser.hotel.uid}', extensionName: 'epproducts', pluginName: 'product_detail')}"/>
|
||||
<f:variable name="teaserUrl" value="{f:uri.action(pageUid: teaser.product.detailPage, action: 'detail', controller: 'Product', arguments: '{product: teaser.product.uid, hotel: teaser.hotel.uid}', extensionName: 'epproducts', pluginName: 'product_detail')}"/>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<v:variable.set name="uriLink" value="{f:uri.typolink(parameter: teaser.product.detailPage)}"/>
|
||||
<f:variable name="teaserUrl" value="{f:uri.typolink(parameter: teaser.product.detailPage)}"/>
|
||||
<f:if condition="{slug}">
|
||||
<f:variable name="teaserUrl" value="{teaserUrl}{slug}/"/>
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:render section="Inner" arguments="{_all}"/>
|
||||
@@ -22,7 +25,7 @@
|
||||
<img class="teaserbox__flag"
|
||||
src="{teaser.country.flag}"
|
||||
alt="{teaser.country.name}"/>
|
||||
<a href="{uriLink}" title="{teaser.product.name}">
|
||||
<a href="{teaserUrl}" title="{teaser.product.name}">
|
||||
<f:render section="Image" arguments="{_all}"/>
|
||||
</a>
|
||||
<f:if condition="{teaser.concept.code}">
|
||||
@@ -80,7 +83,7 @@
|
||||
<span class="searchresult-item__label">{f:if(condition: '{teaser.dates -> f:count()} > 1', then: 'Zeitraum', else: 'Termin')}</span>
|
||||
<span class="searchresult-item__daterange">{ep:dateRange(dateFrom: teaser.minDateStart, dateTo: teaser.maxDateEnd, includeLabel: 0)}</span>
|
||||
<f:if condition="{teaser.dates -> f:count()} > 1 && !{teaser.daytrip}">
|
||||
<a href="{uriLink}" title="Alle Termine {teaser.product.name}">
|
||||
<a href="{teaserUrl}" title="Alle Termine {teaser.product.name}">
|
||||
<span class="searchresult-item__daterange">
|
||||
<i class="fa fa-arrow-circle-right"></i> {teaser.dates -> f:count()} Termin{f:if(condition: '{teaser.dates -> f:count()} > 1', then: 'e')}
|
||||
</span>
|
||||
@@ -91,7 +94,7 @@
|
||||
</div>
|
||||
<div class="teaserbox__aside__bottom">
|
||||
<span class="searchresult-item__price">ab {teaser.minPrice} €{f:if(condition: teaser.pseudoPrice, then: ' <s class="searchresult-item__pseudo-price">{teaser.pseudoPrice} €</s>')}</span>
|
||||
<a href="{uriLink}" title="{teaser.product.name}" class="button button--full searchresult-item__button">Details & Buchen</a>
|
||||
<a href="{teaserUrl}" title="{teaser.product.name}" class="button button--full searchresult-item__button">Details & Buchen</a>
|
||||
</div>
|
||||
</div>
|
||||
<watchlist-toggle uid="{teaser.key}" class="teaserbox-watchlist"></watchlist-toggle>
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<html data-namespace-typo3-fluid="true" lang="en"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
||||
|
||||
<f:layout name="Default"/>
|
||||
|
||||
<f:section name="Main">
|
||||
<f:if condition="{teaser.dates}">
|
||||
<f:switch expression="{data.layout}">
|
||||
<f:case value="2">
|
||||
{f:variable(name: 'partial', value: 'Product/TeaserWide')}
|
||||
</f:case>
|
||||
<f:case value="3">
|
||||
{f:variable(name: 'partial', value: 'Product/TeaserWide')}
|
||||
</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:if>
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user