Is it possible to create a new Media Library Bucket in Twill 3
Hi! I'm a software eng at the Art Institute of Chicago and we use Twill as our CMS. We're trying to separate images into two separate buckets either via a new mediables-esque table or configuring a new S3 bucket connection and having it displayed as a separate tab in the add media modal. We've got something sort of working but the way we're doing it is hacked together. We're building twill and then copying a new version of the media library related code and adding our own versions of the vue's. This isn't the best in terms of maintaining but it's the only way we could get it working.
Is there a way in Twill 3 to configure new buckets/tabs in the mediables field so we can differentiate the images? My take on it is to add some sort of differentiator when saving the media in a column or metadata but we're not sure if it's possible.
7 Replies
Another consideration is there maybe a way to add an automatic tag in the context of a model?
Hi @xnvert I'm really sorry for the delay, just seeing this. I was actually traveling and met with Nikhil from AIC at a conference a couple weeks ago!
There is a way to add new tabs to the media library, with full control over the source of the items.
In the main Twill layout, you'll find that the tabs are defined in the Vuex store, like this:
https://github.com/area17/twill/blob/3.x/views%2Flayouts%2Fmain.blade.php#L112-L133
So if you push another type there, you will be able to control the endpoint it uses to fetch items.
GitHub
twill/views/layouts/main.blade.php at 3.x · area17/twill
Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/c...
With this approach you can choose to add a field to the medias table or use a separate model all together
Hello @ifox , I think this topic is quite related to the one I am currently dealing with. It's about the possibility of using a folder structure in the media library. I had read that this is planned for the future. Is there any new information on the status of this? Alternatively, I was thinking about building a component myself, which could then be integrated into a separate tab here, as in this example?
Please let me know what you think if it is feasible or if there are better options.
While trying it out, I realized that it could be a bit more complex to use the images in the components, as they always reference the "original" media selector.
Here is the link to my thread: https://discord.com/channels/811936425858695198/1298616152309891112
Hi @FL260 we haven't implemented folders yet and we're not sure we want to. Folders are a fixed structure that can go out of control and create duplicate instances of the same media in multiple folders. Tags and other metadata are a better organization principle in modern digital management software. A media can be attached to multiple tags without duplication. We could render the tags as folder visually, but I don't think we want a file explorer kind of folders, where they can be nested. We are in the process of developing a custom DAM with Twill, so this is definitely something we are thinking about.
Hi @ifox thank you for your explanations and insights! I think we’ll need to rethink our initial ideas regarding the image library in folder structures. Tags and metadata indeed seem to be a much more flexible to organization.
One suggestion that came to mind: it would be great if the filter functionality allowed filtering by multiple tags simultaneously (e.g., Year 2024, Category Volleyball, Date 07-20, etc.). Currently, it’s possible to assign multiple tags to uploads (like 2024 and Volleyball), but I don’t think there’s a way to filter for images that match all these tags at once. Or have I missed this functionality?
Looking forward to hearing your thoughts! 😊
One suggestion that came to mind: it would be great if the filter functionality allowed filtering by multiple tags simultaneously (e.g., Year 2024, Category Volleyball, Date 07-20, etc.). Currently, it’s possible to assign multiple tags to uploads (like 2024 and Volleyball), but I don’t think there’s a way to filter for images that match all these tags at once. Or have I missed this functionality?
Looking forward to hearing your thoughts! 😊
Multiple tags filtering is something we have been working on, yes! You haven't missed anything, it isn't currently available.