fix: accept link field values and page uids for hotel url generation

This commit is contained in:
Björn Fromme
2025-07-17 15:38:04 +02:00
parent 53f6062a8b
commit d017948210
2 changed files with 3 additions and 7 deletions
@@ -355,10 +355,6 @@ class DateService implements SingletonInterface
$categoryUid = Hotel::CATEGORY_STANDARD;
}
$hotelUid = $row['hotelUid'];
$hotelUri = $this->uriBuilder
->reset()
->setTargetPageUid((int)$row['hotelDetailPageUid'])
->buildFrontendUri();
if (!array_key_exists($hotelUid, $priceTable[$categoryUid])) {
$priceTable[$categoryUid][$hotelUid] = [
@@ -366,7 +362,7 @@ class DateService implements SingletonInterface
'hotelName' => $row['hotelName'],
'hotelShortName' => $row['hotelShortName'],
'hotelTitle' => $row['hotelTitle'],
'hotelUri' => $hotelUri,
'hotelDetailPageUid' => $row['hotelDetailPageUid'],
'bookingUrl' => BookingUrlUtility::generateUrl([
'bookingId' => $row['dateBusProId'],
'hotelId' => $row['hotelBusProId'],
@@ -36,7 +36,7 @@
<f:for each="{pricetable.{categoryKey}}" as="row">
<tr>
<td class="px-2 py-1 border border-zinc-200">
<f:link.typolink parameter="{row.hotelUri}" class="underline">
<f:link.typolink parameter="{row.hotelDetailPageUid}" class="underline">
<f:if condition="{row.hotelShortName}">
<f:then>
{row.hotelShortName}
@@ -59,7 +59,7 @@
<f:if condition="{row.rooms.{type}.available}">
<f:then>
<f:link.typolink
parameter="{row.hotelUri}"
parameter="{row.hotelDetailPageUid}"
class="whitespace-nowrap {ep:themeClasses(classes: '{sbw: \'text-sbw-primary\', snz: \'text-snz-primary\', uch: \'text-uch-primary\'}', key: settings.themekey)}">
{row.rooms.{type}.price}
{f:if(condition: '{row.rooms.{type}.undersubscription}', then: '*')}