We have a 'Our team' page with team members. You can use a MultiNodeTreePicker to select multiple 'Landing Pages' to which those team members belong.
And just to be clear, the 'Landing Pages' are services.
Reading out the team members on those landing pages is no problem, but they must be shown on a child page of a landing page. Every landing page gets an 'Our team' page and those team members should be read out there.
The code we now have is therefore fine for reading on the landing page itself, but not for an underlying page.
What should be adjusted?
@{
var selection = Umbraco.Content(Guid.Parse("84a1edf4-a270-4fbc-8b5e-512ccecf1217"))
.ChildrenOfType("teamlid")
.Where(x => x.IsVisible());
List<IPublishedContent> totalFoundItems = new List<IPublishedContent>();
foreach(var item in selection){
var articleSectors = item.Value<IEnumerable<IPublishedContent>>("landingspaginas");
if (articleSectors != null){
foreach (IPublishedContent sectorArticle in articleSectors){
if (sectorArticle.Id.ToString() == Model.Id.ToString()){
totalFoundItems.Add(item);
}
}
}
}
var recordsTeam = from articleNode in totalFoundItems select articleNode;
if (recordsTeam.Count() > 0){
foreach (var item in recordsTeam){
}
}
}
Picked items on a child page
The situation:
We have a 'Our team' page with team members. You can use a MultiNodeTreePicker to select multiple 'Landing Pages' to which those team members belong. And just to be clear, the 'Landing Pages' are services. Reading out the team members on those landing pages is no problem, but they must be shown on a child page of a landing page. Every landing page gets an 'Our team' page and those team members should be read out there. The code we now have is therefore fine for reading on the landing page itself, but not for an underlying page. What should be adjusted?
is working on a reply...