I have an application where i need to output some fields when an item is chosen in a dropdownlist. i have a macro that choses what to output, but instead of outputting the value of the fields it outputs the ids or something.. looks like this: <option><MultiNodePicker type="content"><NodeId>1700</nodeId></MultiNodePicker></option>
Code in macro:
@{
var biler = Umbraco.Content(1674).Children();
}
@foreach (var item in biler){
if (item.DocumentTypeAlias == "Leasingcar")
{
<option>@Html.Raw(item.wwbilmaerke)</option>
}
else
{ }}
Have you seen the documentation for the MultiNode TreePicker there are some great examples on how to get the data from the picked items both in dynamic Razor and strongly typed Razor.
macro outputting ids instead of text
Hello
I have an application where i need to output some fields when an item is chosen in a dropdownlist. i have a macro that choses what to output, but instead of outputting the value of the fields it outputs the ids or something.. looks like this:
<option><MultiNodePicker type="content"><NodeId>1700</nodeId></MultiNodePicker></option>
Code in macro:
@{ var biler = Umbraco.Content(1674).Children(); }
Hi Simon and welcome to our.
Have you seen the documentation for the MultiNode TreePicker there are some great examples on how to get the data from the picked items both in dynamic Razor and strongly typed Razor.
https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/multinode-treepicker
Hope this can help you further.
/Dennis
Hi Dennis
thanks ill look at it!
still need help on this one.. Current code =
is working on a reply...