PageLanguageLink in version 7.0
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?
Hello
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];