Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi there,
I want to build a custom route as follows:
http://localhost:53162/en/{countryName}/hotel/{hotelName}/special-offers
to redirect to a custom special offer page.
However, I am using
Int32 nodeID = umbraco.uQuery.GetNodeIdByUrl("/{lang}/{countryName}/hotel/{hotelName}/special-offers")
to return the nodeId which returns me as null since it does not compile the dynamic URL.
Is there any other way of doing this ?
Much grateful for your help.
B.
Hi Brita
You need to connect URL with id somehow.
MAybe use URL rewriting + custom logic or just add the id to the URL as a param.
Alex
Hi Alex,
Thanks for the reply.
I managed with returning the URL path dynamically by using the below in my controller:
Request.Url.AbsolutePath
Thanks again. Cheers :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Custom route
Hi there,
I want to build a custom route as follows:
http://localhost:53162/en/{countryName}/hotel/{hotelName}/special-offers
to redirect to a custom special offer page.
However, I am using
to return the nodeId which returns me as null since it does not compile the dynamic URL.
Is there any other way of doing this ?
Much grateful for your help.
B.
Hi Brita
You need to connect URL with id somehow.
MAybe use URL rewriting + custom logic or just add the id to the URL as a param.
Alex
Hi Alex,
Thanks for the reply.
I managed with returning the URL path dynamically by using the below in my controller:
Thanks again. Cheers :)
is working on a reply...