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
Just started using umbraco and i can't seem to get this package to work.
I'm not using the model viewer for my site.
How can you access the values you've stored?
Here is a sample code i created
var Category = Model.Content.GetPropertyValue<MultiUrls>("categoryLinks");
@if (Category.Count > 0)
@foreach (var item in Category)
<li><a href="@item.Url" target="@item.Target">@item.Name</a></li>
I am getting a parsing error for this
Can anyone point me in the right direction?
Are you using this package - https://our.umbraco.org/projects/backoffice-extensions/multi-url-picker/ ?
All files are in place?
What error did you get?
Yes thats the package I'm using.
I am getting a parsing error when I'm adding the get property value for multi urls.
All files are in place in the App_Plugins.
And what parsing error did you get?
Can you check what is storing in "categoryLinks" Umbraco field?
Thanks for the reply, have found another way to get what I want. This will do for now as I am really pressed for time.
Really appreciate the reply.
You are welcome, John.
Aks if you have a question, have a nice day!
If you are using the latest version of the Multi Url Picker package, so shouldn't use MultiUrls since it is deprecated.
Instead cast the value IEnumerable<Link> or Link if you have set maximum = 1 in the property editor config.
var categories = Model.Content.GetPropertyValue<IEnumerable<Link>>("categoryLinks");
var category = Model.Content.GetPropertyValue<Link>("categoryLink");
if you are using ModelsBuilder you can just write:
var categories = Model.Content.CategoryLinks;
var categories = myNode.CategoryLinks;
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted