Multinode Treepicker - fetching properties of the nodes?
Hi :-)
I'm using Multinode Treepicker to place different nodes in different sides.
But I'm only able to get the Name of the node – not the other properties of the node?
var ejendomsId = Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>("ejendomme");
foreach (var ejendom in ejendomsId) {
<h1>@ejendom.Name</h1> <!-- works fine -->
<h2>@ejendom.adresse</h2> <!-- doesn't work -->
}
This is the error message I get:
*Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1061: 'Umbraco.Core.Models.IPublishedContent' does not contain a definition for 'adresse' and no extension method 'adresse' accepting a first argument of type 'Umbraco.Core.Models.IPublishedContent' could be found (are you missing a using directive or an assembly reference?)*
Multinode Treepicker - fetching properties of the nodes?
Hi :-)
I'm using Multinode Treepicker to place different nodes in different sides. But I'm only able to get the Name of the node – not the other properties of the node?
This is the error message I get:
*Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1061: 'Umbraco.Core.Models.IPublishedContent' does not contain a definition for 'adresse' and no extension method 'adresse' accepting a first argument of type 'Umbraco.Core.Models.IPublishedContent' could be found (are you missing a using directive or an assembly reference?)*
Hi
to get properties you have added to a node, you need to call the
GetPropertyValue("name")
method so for exampleshould get you the property you want.
is working on a reply...