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
Hi Everyone,
I was hoping this would be fairly simple, but it seems that is is not, for me at least :).
I have a page called Event. One of the properties is a multi-media picker called "Event People". (Alias = "eventPeople").
How can I check to see if the user has populated this property?
@if(Model.Event.IsNull("eventPeople")){}else{}
Kind regards,
J
Hi James,
Have you have a look on the documentation for the Media Picker for Umbraco 7. There is a dynamic razor version and a strongly typed, take a look here: http://our.umbraco.org/documentation/using-umbraco/backoffice-overview/property-editors/Built-in-Property-Editors-v7/Media-Picker
Hope this helps,
/Dennis
Hi Dennis,
Its an earlier Umbraco version using DAMP Multi-media picker
Any ideas?
Cheers.
Okay have you tried this maybe it will works.
@if(Model.HasValue("eventPeople")){}else{}
Or maybe see this video can help you, http://www.screenr.com/qvj8
If not then you could try to ask in the DAMP space of Our. http://our.umbraco.org/projects/backoffice-extensions/digibiz-advanced-media-picker
Maybe you also could have a look on DAMP Property Editor Value Converter http://our.umbraco.org/projects/backoffice-extensions/damp-property-editor-value-converter there is a method called Any. Any - Returns a boolean to see if any items are selected.
Cheers Dennis!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Checking if a property is empty
Hi Everyone,
I was hoping this would be fairly simple, but it seems that is is not, for me at least :).
I have a page called Event. One of the properties is a multi-media picker called "Event People". (Alias = "eventPeople").
How can I check to see if the user has populated this property?
@if(Model.Event.IsNull("eventPeople")){}else{}
Kind regards,
J
Hi James,
Have you have a look on the documentation for the Media Picker for Umbraco 7. There is a dynamic razor version and a strongly typed, take a look here: http://our.umbraco.org/documentation/using-umbraco/backoffice-overview/property-editors/Built-in-Property-Editors-v7/Media-Picker
Hope this helps,
/Dennis
Hi Dennis,
Its an earlier Umbraco version using DAMP Multi-media picker
Any ideas?
Cheers.
Hi James,
Okay have you tried this maybe it will works.
Or maybe see this video can help you, http://www.screenr.com/qvj8
If not then you could try to ask in the DAMP space of Our. http://our.umbraco.org/projects/backoffice-extensions/digibiz-advanced-media-picker
Maybe you also could have a look on DAMP Property Editor Value Converter http://our.umbraco.org/projects/backoffice-extensions/damp-property-editor-value-converter there is a method called Any. Any - Returns a boolean to see if any items are selected.
Hope this helps,
/Dennis
Cheers Dennis!
is working on a reply...