Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
The site is v4.8.1 with uComponents v5 installed as well.
I have a razor script that takes a parameter of the property alias. I then want to get the content from that item.
menuAlias is either "siteMenu1" or "siteMenu2" - which are both Multi-Url Pickers.
var menuAlias = Parameter.menuAlias; var siteMenu = Model.GetProperty(menuAlias);
The above works but I then cannot do
if (siteMenu.Items.Count > 0)
Can I declare siteMenu as the correct datatype so that the correct properties will be available?
I added
@using uComponents.DataTypes.MultiUrlPicker.Dto;
and then changed the code to
MultiUrlPickerState siteMenu = MultiUrlPickerState.Deserialize(Model.GetProperty(menuAlias).Value);
and now it works!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Dynamically choose Multi-Url Picker
The site is v4.8.1 with uComponents v5 installed as well.
I have a razor script that takes a parameter of the property alias. I then want to get the content from that item.
menuAlias is either "siteMenu1" or "siteMenu2" - which are both Multi-Url Pickers.
The above works but I then cannot do
Can I declare siteMenu as the correct datatype so that the correct properties will be available?
I added
and then changed the code to
and now it works!
is working on a reply...