Hi,
Is there an API call which will give me the calculated userfriendly URL for a given product on a given page?
Med venlig hilsen/Best regards,
Sten Hougaard
Webudvikler
A: København/Aarhus . W: www.1stweb.dk
@: netsi1964
Hi,
Is there an API call which will give me the calculated userfriendly URL for a given product on a given page?
Med venlig hilsen/Best regards,
Sten Hougaard
Webudvikler
A: København/Aarhus . W: www.1stweb.dk
@: netsi1964
Hi Sten,
You can do something like Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("Default.aspx?ID=7&ProductID=PROD1001") to do that.
- Jeppe
Hi Jeppe,
I have a solution where I have setup customized URLs (here is part of Customized URL settings):
but I only get the same URL back as I pass the to the GetFriendlyUrl method, for instance:
Default.aspx?ID=1565&ProductID=107340
Solution info:
Content version 20.3.1.14
Assembly versions Dynamicweb.dll 8.4.0.16
Med venlig hilsen/Best regards,
Sten Hougaard
Webudvikler
A: København/Aarhus . W: www.1stweb.dk
@: netsi1964
If you type that url into the address bar of the browser, are you then transferred correctly to the friendly url?
Hi Jeppe,
You are right! :-) Me bad! - It was a matter of the ID which I gave it, it was the wrong ID. Changing that made your solution work perfectly!
Thank you!
Med venlig hilsen/Best regards,
Sten Hougaard
Webudvikler
A: København/Aarhus . W: www.1stweb.dk
@: netsi1964
Glad to hear it :)
You must be logged in to post in the forum