Content from specific folder

Enonic version: 5.3.0
OS: Windows

In a content-type:
How do I limit a ContentSelector or a ImageSelector to only pick from a specific folder (eg. a image-folder) or child-content (eg. uploaded files that I want to show as attachments)?

At the moment - you don’t… We did consider a query option in the config, but started out With this. How would you like this to work?

A query option would be nice! In that case, I guess both my needs would be covered.

Content Selector and Child content
In this project I’m working on, we want a simple attachment-solution. Missing this functionality, I thought I could let them upload the file as a “child”, select it in the Content Selector and make a presentation in some part.

Image Selector and images in a specific folder
In this project we have uploaded lots of profile-pictures in a folder. In the person profile (content-type) we would like to select a picture from this (and only this) folder.

1 Like

So a) you want a “media-selector” input type and b) better filtering capabilities for selectors?

What about this new config for ImageSelecter (and other file selectors)?

   <include-path>[SITE]/this/, [SITE]/and-this/, [CURRENT]</include-path>

I always create a “/archive/”-folder in root, outside the site, that clients can store images without deleting them if unsure what to do with them. Like a bin. But when they select images from this it won’t show because it’s outside the site and the access rights are different. Would be nice to filter these folders out.

[SITE] or similar variable keywords would be needed to auto-add path to current Site or current path. Not sure of best way to do that.

A perhaps simpler idea would be to take folder path or folder name and put as headings inside the ImageSelector to visually group all images more clearly. Perhaps sort the list so that children items comes first (if not already done this way).

We’re specing possible solutions in the upcoming sprints - will come back with suggestions here.

1 Like

We have approved to implement a filter. The spec is not done yet.