Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi,
take a look at this thread: http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=78972
Unfortunately that does work for me :(
I have the following example code:
var resolver = ServiceLocator.Current.GetInstance<UrlResolver>();
var urlBuilder = new UrlBuilder("http://site.com/page-one/");
var contentReference = resolver.Route(urlBuilder);
The site has a page named "Page-One", but the contentRefefrence is always null.
Is this something to do with routing, the site was a CMS6R2 site which has been upgraded to 7.5 (still web forms)
After decompiling the UrlResolver I see my problem.
The code checks whether the host I am sending in is in the site definitions, if it isn't it returns null.
The Url I was browsing the site with was not in the site defintions hence the problem.
If I use the page path rather than the absoute url it works fine as it uses the default site defition.
Hi
How can I get a content page from it's friendly relative url. e.g. /folder-one/folder-two/page/
Lee