PageNode.Urls is empty
Using the Fluent API in Sitefinity 5.0 SP1, I'm just trying to get the url for a page to put in the href attribute of a link. I have a collection of PageNodes and I'm iterating over them. The PageNode.Url is always empty. Part of the problem might be that I'm getting the PageNodes by finding a parent page (titled "Careers") which is just a grouping page with no content. CareerLinkData is just a simple class with two string properties. I see references to a GetFullUrl() method in the forum, but it seems like it's not in Sitefinity anymore?
private
List<CareerLinkData> GetCareerPages()
List<CareerLinkData> results =
new
List<CareerLinkData>();
var pageNodes = App.WorkWith().Pages().ThatArePublished().Where(pN => (pN.Page !=
null
&& pN.Parent.Title ==
"Careers"
)).Get();
foreach
(Telerik.Sitefinity.Pages.Model.PageNode pn
in
pageNodes)
results.Add(
new
CareerLinkData(pn.Urls.FirstOrDefault().Url, pn.Title));
return
results;
Hi,
using
Telerik.Sitefinity.Pages.Model;
using
Telerik.Sitefinity.Modules.Pages;