November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
I had a similar problem, ended up using @Url.ContentUrl(contentReference) instead (System.Web.Mvc.WebViewPage.Url). Made a wrapper for it for using in the controllers.
//Mathias
Mathias Kunto, Thank you.
But, this method doesn't work. I get the similar result, if i use urlResolver.GetUrl in edit mode.
Best Regards,
Dzmitry Salauyou
If I use
var url =urlResolver.GetUrl(contentReference, language, new VirtualPathArguments() {RouteValues = routeValueDictionary})
where routeValueDictionary = new RouteValueDictionary {{"overview", true}},
I get url = "/episerver/CMS/Content/,,39810/catalog/verktyg-och-maskiner,,1073741825__CatalogContent/?epieditmode=True&overview=True"
Are any ideas?
Best Regards,
Dzmitry Salauyou
Hallo.
I have a problems with UrlResolver.GetUrl(ContentReference contentLink, string language). When i call this method from UI, I get correct url for item of menu. When i call this method from edit mode, i get url with element of url of edit mode for item of menu.
Version: Assembly EPiServer.dll, v7.6.5.0
Example(get url for item of menu):
...
var urlResolver = ServiceLocator.Current.GetInstance();
var url = urlResolver.GetUrl(contentReference, language);
...
Where contentReference={1073741825__CatalogContent} and language="sv".
When call this code from edit mode: url = "/episerver/CMS/Content/,,39810/catalog/verktyg-och-maskiner,,1073741825__CatalogContent/?epieditmode=True"
When call this code from UI: url = "/catalog/verktyg-och-maskiner/?overview=True"
Is it bug? Or do I do something wrong? Are any ideas? Please, help.
Best Regards,
Dzmitry Salauyou