More in this section

Forums / Developing with Sitefinity / PageLanguageLink in version 7.0

PageLanguageLink in version 7.0

2 posts, 0 answered
  1. Jared
    Jared avatar
    122 posts
    04 Apr 2013
    18 May 2015
    Link to this post
    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?
  2. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    19 Apr 2017
    21 May 2015
    Link to this post
    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;
                   pageData = pageDataList.First();
                   title = pageData.HtmlTitle[ci];

    Hope this helps.

    Nikola Zagorchev
    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
2 posts, 0 answered