error CS1977: Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type
var testimonials = Umbraco.ContentSingleAtXPath("//HomePage").GetPropertyValue<ArchetypeModel>("testimonialItems").Fieldsets.ToList().RandomOrder().Take(1);
Random and Max from archetype
Is it possible somehow to randomize the order and take 1 item from an archetype fieldset ?
I have this now
I have tried with
But I am getting an error that Take and RandomOrder is not a part of ArchetypeModel
Have you tried this:
When using the above I am getting
what about this? (sorry I don't currently have a project with Archetype)
That didn't work either. Getting the same error.
OK, one last shot:
Hmm... That didn't work either. Same error!
Thanks for the help anyway! :)
Hi Peter,
Can you try this.
If it's not working, can you post the exact error
Dave
Inserting this I am getting the error:
the same with Take or RandomOrder
Hi
Can you try this :
Hi Dave,
Just the same error.
Am I missing something?
is working on a reply...