Reputation: 715
I need translate web-part code from Kentico 6 to Kentico 8.
In kentico 6 was nice function URLHelper.CurrentURL that returns requested current URL. Kentico removed (or deleted?) this function. So which appropriate method uses Kentico 8 API?
Thanks!
Upvotes: 1
Views: 602
Reputation: 1869
There are a number of methods available to you depending on what you want to do. The two I commonly use are from CMS.Controls
The GetNavigationUrl method is pretty handy as it takes note of your navigation settings can help to reduce unnecessary 301 redirects (depending on how you have things set up)
Upvotes: 2
Reputation: 91
There were some changes in Kentico 7 as well (see here) but for Kentico 8, you can use this api changes tool. I believe it is now CMS.Helpers.RequestContext.CurrentURL
Upvotes: 9