Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Media Picker not available as macro parameter #5335

Closed
Tobelemo opened this issue Apr 24, 2019 · 5 comments · Fixed by #6149
Closed

Multiple Media Picker not available as macro parameter #5335

Tobelemo opened this issue Apr 24, 2019 · 5 comments · Fixed by #6149

Comments

@Tobelemo
Copy link

The Partial View Macro File snippet "Gallery" recommends the use of the property editor "Multiple Media Picker".
This property editor is not available as an option in the "Editor" dropdownlist when adding parameters to a macro.

@kjac
Copy link
Contributor

kjac commented Apr 24, 2019

... disregard my last comment 😊

@nul800sebastiaan
Copy link
Member

Yeah, that seems like an oversight! The media picker can be configured as a multiple media picker as well, but I'm not sure how we'd do that for a macro parameter editor. 🤔

@kjac
Copy link
Contributor

kjac commented May 1, 2019

I had a stab at it really quick the other day but since the multinode treepicker doubles as multiple content picker for macros, there is no easy fix for this. The required fix sadly involves a new dedicated value converter for a new macro parameter property type.

@AlphaDelta
Copy link

AlphaDelta commented Jul 22, 2019

I've had success with the following:

image

Result:

image

image

I am however unaware of the full implications of extending MediaPickerConfigurationEditor and overriding DefaultConfigurationObject, negative or otherwise.

It appeared fairly safe to me by the fact that it's simply DefaultConfigurationObject => new T(); if it wasn't overridden; https://github.com/umbraco/Umbraco-CMS/blob/v8/dev/src/Umbraco.Core/PropertyEditors/ConfigurationEditorOfTConfiguration.cs#L100

Edit: "Umbraco.MultipleMediaPicker" should be used for the alias of the property editor as that's what it was in v7 (ref), my mistake.

@nul800sebastiaan
Copy link
Member

PR to fix this: #6149

warrenbuckley pushed a commit that referenced this issue Aug 21, 2019
…ker-parameter-editor

Fix #5335 - Multiple Media Picker not available as macro parameter
warrenbuckley pushed a commit that referenced this issue Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants