Hi guys,
It's is possible via API to get the fields from a dropdown list? I want to display this information in a razor template for the user select one option.
I tried with the ItemManager.Metadata but i got no success.
Best regards.
António Ramos
Hi guys,
It's is possible via API to get the fields from a dropdown list? I want to display this information in a razor template for the user select one option.
I tried with the ItemManager.Metadata but i got no success.
Best regards.
António Ramos
bump
Hi Antonio
You can take a look at the item type like this:
Dim it As Dynamicweb.Content.Items.Metadata.ItemType = Dynamicweb.Content.Items.ItemManager.Metadata.GetItemType("some")
For Each f As Dynamicweb.Content.Items.Metadata.ItemField In it.Fields
For Each opt As Dynamicweb.Content.Items.Metadata.FieldOptionMetadata In f.Options.Values
Dim name = opt.Name
Dim value = opt.Value
Next
Next
Thks Nicolai
Best regards,
António Ramos
You must be logged in to post in the forum