PageLanguageLink in version 7.0

Posted by Community Admin on 04-Aug-2018 19:20

PageLanguageLink in version 7.0

All Replies

Posted by Community Admin on 18-May-2015 00:00

I know that PageLanguageLink no longer exists in version 7.0 and later.  If this was a property that was being used, how can this value be accessed with the new changes to the API?

Posted by Community Admin on 21-May-2015 00:00

Hello Jared,

You can check the replies in this forum thread, which the same property is discussed. If you want to get localized properties from the PageData, you can do it using the node Id and get the pageData or to use the Lstring property, depending on whether the page translations are synced or not:

PageManager manager = PageManager.GetManager();
           var nodeId = Guid.Parse(nodeKey);
           string title = string.Empty;
           var pageDataList = manager.GetPageDataList().Where(p => p.NavigationNodeId == nodeId).ToList();
           pageData = pageDataList.Where(p => p.Culture == ci.Name).FirstOrDefault();
           if (pageData != null)
           
               title = pageData.HtmlTitle;
           
           else
           
               pageData = pageDataList.First();
               title = pageData.HtmlTitle[ci];
           

Hope this helps.

Regards,
Nikola Zagorchev
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed