I am trying to use the Multinode Treepicker and am following the at
https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multinode-treepicker. The Picker is setup and a property of the "About Us" page allowing you to pick from the content type "Team Member" and it worked. I was able to pick the member and save the doc but now when I am trying to programicly display the information I can't see to access any of the team member properties. Here is my code set but both methods of accessing the "Display Name" of the team member give the error
"IPublishedCointent does not contain a definition for 'displayName' and no accessile extension method 'displayName' accepting a first argument of type 'IPublishedCOntent' could be found (are you missing a using directive or an assemly reference?)"
I presume I am missing something the document is not covering but I don't know what, do I need to inject the Team Members type or add a some using statment? Below is my code. Thanks for the help.
@using Umbraco.Cms.Web.Common.PublishedModels;
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
@{
Layout = "_layout.cshtml";
}
@{
var teamMemberList = Model.TeamMembers;
foreach (var teamMember in teamMemberList)
{
@teamMember.displasyName
}
}
@{
var teamMemberList2 = Model.Value<IEnumerable
>("teamMembers");
if (teamMemberList2 != null)
{
foreach (var teamMember in teamMemberList2)
{
@teamMember.displayName
}
}
}
https://cdn.discordapp.com/attachments/1166152377603215360/1166152377754198056/Screenshot_2023-10-23_190604.png?ex=65497308&is=6536fe08&hm=3d88d0c18f62ef4e22ba451cb03cd8ad566dbe312f113ac74d3801fca489aa4d&