Merged in feat/SW-1452-city-page-filter-2 (pull request #1392)

feat(SW-1452): Added filtering and sorting to destination city pages

* feat(SW-1452): Added filtering and sorting to destination city pages

* feat(SW-1452): Added temporary component for country pages to avoid Context issues


Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-02-25 13:02:38 +00:00
parent 8a564274c5
commit 3867baadd6
53 changed files with 1561 additions and 255 deletions

View File

@@ -40,13 +40,17 @@ export const middleware: NextMiddleware = async (request) => {
await getUidAndContentTypeByPath(incomingPathNameParts.join("/"))
if (parentUid) {
contentType = parentContentType
uid = parentUid
switch (parentContentType) {
case PageContentTypeEnum.hotelPage:
// E.g. Dedicated pages for restaurant, parking etc.
contentType = parentContentType
uid = parentUid
searchParams.set("subpage", subpage)
break
case PageContentTypeEnum.destinationCityPage:
// E.g. Active filters inside destination pages to filter hotels.
searchParams.set("filterFromUrl", subpage)
break
}
}
}