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:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user