PageData's DetermineAutomaticURL missing

Vote:
 

Hi,

I'm in the process of migrating EPiServer 4.62 code to EPiServer 5 R2. I'm getting compliation error for the following line of code:

foreach(PageDataObj page in PageDataCollectionObj)
{
  //I get error : EPiServer.Core.PageData
  // does not contain defnition for DetermineAutomaticURL
  string url = page.DetermineAutomaticURL(page.LanguageBranch);
}


Can you please let me know if this method exist in EPiServer 5?

Thanks in advane,

senthil

#52619
Aug 05, 2011 14:27
Vote:
 

Hi,

The DetermineAutomaticURL method does not exist in EPiServer 5. Instead you can use the LinkURL property on the PageData object to get the url of the page and let EPiServers built in url rewriter take care of the url rewriting.

If you need to get the friendly url yourself (instead of letting the built-in url rewriter do the work for you), you can have a look at this blogpost: http://tedgustaf.com/en/blog/2008/2/how-to-get-the-friendly-url-of-a-page-in-episerver-cms/

For more information on url rewriting in EPiServer CMS 5, you can take a look at the developers guide: http://sdk.episerver.com/library/cms5/Developers%20Guide/Friendly%20URL.htm

I hope this helps!

Karoline

 

#52621
Aug 06, 2011 0:25
Vote:
 

Hi Karoline,

Thanks for the suggestions. I'll try them out.

regards,

senthil.

#52648
Aug 08, 2011 13:42
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.