diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Hotel.php b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Hotel.php index 33c41e7b..bb13ae80 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Hotel.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Hotel.php @@ -744,6 +744,18 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te return $this->category; } + /** + * @return string + */ + public function getCategoryLabel() + { + if ($category = $this->getCategory()) { + return static::$categoryLabels[$category]; + } + + return null; + } + /** * @param int $category */ diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/Details.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/Details.html index d8855c9d..54f854e9 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/Details.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/Details.html @@ -1,7 +1,8 @@ {namespace ep=EP\EpTheme\ViewHelpers} +{hotel.name -> f:format.raw()}{f:if(condition: hotel.categoryLabel, then: ' ({hotel.categoryLabel -> f:format.raw()})')} -
{hotel.name -> f:format.raw()}
-

{hotel.name -> f:format.raw()}

+
{hotelTitle}
+

{hotelTitle}

{hotel.description -> f:format.html()}