We have moved to GitHub Issues
Created by Jeavon Leopold 04 Feb 2014, 16:23:00 Updated by Brian Patton 15 Jul 2014, 20:41:10
Per Ploug: Editing the issue, to make it clear we are only including the picker, not the xpath, for more info, look at the discussion below.
It was one of the most useful features of DAMP and should be added!
One further nice to have would be to have a placeholder for the XPath expression, it would be $currentNodeId. This would be really useful for when a content node has an associated media folder, then it would be possible to have one data type for all. e.g. //MyMediaFolder[@myContentPicker = $currentNodeId].
Probably a niche requirement but a pattern we have found frequently with content pages that have a associated gallery.
Currently media doesnt support xpath, unless you hack it, like ucomponents did. The problem is that if you have a site with a reasonable sized media library, this will really slow down the site everytime you open a media picker.
This is what happens:
Now imaging if you have 10,20 or 30.000 media items, that would but a huge strain on your DB every time you do this.
So, I will not add this to the core or enable it through the UI, but please feel free to extend the picker yourself and release as a package, all the API's are in place for this, but it exposes a very big performance burden to just have it included by default.
It is something that will come, when the new umbraco cache is included, if you need it today, I guess Damp for V7 would be an obvious project to build.
Support for xpath is hard and was also pretty slow for DAMP, but selecting a start node through a picker is probably not that hard. You don't need build an in memory xml document for that and since the media library usually isn't multilingual (an image can be the same for all languages) that will be used most anyway.
Yeah, startnode pickers are fine for setting a root folder, the dialog already supports that so just the picker configuration that needs to change.
@Per.Ploug that will be a great improvement! I hope once the new cache layer is available that more complex non Xpath queries will be possible on media in the same way as content.
We needed to set a start node for a media picker, so we created a custom property editor to handle it. Like Per says, it was literally adding in a media picker on the data-type's config.
If interested, I can send a pull-request for it, but wanted to check first - in case we'd be duplicating efforts.
A pull request would be awesome lee :)
Pull request here: https://github.com/umbraco/Umbraco-CMS/pull/300
@Per - I've got a Courier DataResolver too (for the prevalue start nodeId) if you'd like that? I'll email it over.
Can this still make it into 7.1? The "Due in Version" on the right is not set yet.
I just tested the 7.1 Beta and this feature is still missing. I really hope this will be part of 7.1 because there is already a pull request for it.
Fixed in rev 375b3948e0e1b19452d40cc17e4da2dfab6fc1a4
The built in Image Cropper, should have a 'Start Node' feature as well :)
Not sure if this is related, but i'm seeing an issue where if a user is restricted and has a start node set for their media library, that the v7 media picker doesn't work for the restricted user from the RTE or when using a media picker as a macro parameter. I've created an issue: http://issues.umbraco.org/issue/U4-5211
Type: Feature (request)
Assignee: Per Ploug
Backwards Compatible: True
Fix Submitted: Pull request
Affected versions: 7.0.1, 7.0.2, 7.0.3, 7.0.4
Due in version: 7.1.0