Reasonably new to Umbraco, so I'd appreciate any help with this.
Using RJP.MultiUrlPicker I've hit some big bumps in migrating my platform to Razor views.
My code is:
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@using RJP.MultiUrlPicker.Models
@{
var multiUrlPicker = Model.Content.GetPropertyValue<dynamic>("link");
}
<p>@multiUrlPicker</p>
@if (Enumerable.Any(multiUrlPicker))
{
<ul>
@foreach(var link in multiUrlPicker)
{
<li><a href="">@link.Name</a></li>
}
</ul>
} else {
<p>Null</p>
}
On the page this is templating out:
System.Linq.Enumerable+
Null
It's just a single multiurl. I don't quite understand why this isn't working when I'm using the same code I've found everywhere which seems to work for everyone else.
RJP.MultiUrlPicker - no luck, seems to be empty
Reasonably new to Umbraco, so I'd appreciate any help with this.
Using RJP.MultiUrlPicker I've hit some big bumps in migrating my platform to Razor views.
My code is:
On the page this is templating out:
It's just a single multiurl. I don't quite understand why this isn't working when I'm using the same code I've found everywhere which seems to work for everyone else.
Someone fundamental I'm missing?
You need to specify the return type, I think it should be:
Hi Guys
What is a benefit of using MultiUrlPicker? I think related links datatype provides the same functionality and is in the core.
THanks,
Alex
Thanks Jeavon, that's brilliant. It worked. Flagged as solved. Appreciate your help.
Alex, I want to migrate this without changing the datatype as I'm presuming this would require content work to repick the links across the website?
If I'm wrong let me know as I'm only trying to limit the work needed to get this out (I'd probably update the datatype at a later date).
All best, Paul
is working on a reply...