London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
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