forkcms
forkcms copied to clipboard
Media Library: Add title/caption/description/alt to MediaItem
Type
- Feature
Problem description
When creating a media gallery, you can add images. Sometimes you feel the need to have the option to add a description to every image. Which can then be used in for example a Carousel. => This is currently not possible (and most of us create a Banner module to tackle this problem).
Example:
Title + Description + Link to the specific page.
Expected behavior / Proposed solutions
We should add a button to every image, which opens a pop-up, where we can change the "text".
What would be user friendly:
- A way of showing that the image contains "text".
Note: this will add a database field to MediaGroupMediaItem
To Do:
- [x] Integrate in MediaLibrary MediaItemEdit with multi-language support:
- [x] Title
- [x] Caption
- [x] Alt text
- [x] Description
- [x] Link
- [x] Integrate in MediaLibraryHelper for MediaGroups
My suggestion:
- title “text” field
- description “text” field
- link “text” field - you can add your url here
Currently MediaGalleries are language-unaware. Which makes my following question: => do it needs to be possible to add title/description/link for every language... f.e.: in a tabbed modal?
@mathiashelin @Katrienvh are there other sliders that you would prefere for this over bootstrap slider? Or other feedback/requests
@carakas The sliders part is not something that this feature should tackle. This issue goes about adding "title"/"description"/"link" to the MediaGroupMediaItem.
Another PR will add bootstrap carousel: https://github.com/forkcms/forkcms/pull/2470
take a look at wordpress
I would use the same fields
@carakas Thanks for your reply, but you are talking about something else.
MediaItem
=> This is were you are talking about.
- Currently we have a
title
field.
MediaGroupMediaItem
=> This is where I am talking about. A MediaGroup contains multiple MediaItem entities. Because your MediaItem can be connected in multiple MediaGroup, you must be able to add different information...
We want to be able to provide a MediaGroupMediaItem with a custom
-
title
-
description
-
link
So we don't need any additional Banner modules any longer.
I think you are starting to make it too complicated if this is the thing you are trying to do
No no no, this is a huge one.
Example On the home page of a website you need a slider, where you want to show some "news items"/"product foto's"/... each one should have a title/subtitle/ and a clickthrough to the detail page.
This is currently not possible in Fork CMS. Unless you create your own module which will work with FileUploads... (too cumbersome)
That's why my feature PR would be to add these three fields, so this can be achieved.
Use case examples:


and why wouldn't you do that on the top level? like I suggested?
Hmmm, I have thought about it for some hours... Ok, I'll do that.
So:
- Title (will be used in caption)
- Subtitle (will be used in caption)
- Alt (will be used in HtmlDOMElement)
- Description (where will this be used??? @carakas, also in caption?)
- Link (which will be used as
href
in<a>
read more)
@jeroendesloovere check how wordpress handles it
Found on https://codex.wordpress.org/Media_Library_Screen
- Title – The name of the media. A title is often shown on attachment pages and galleries if themes or plugins are designed to display it. F.e.: "Sunset"
- Caption – A brief explanation of the media. F.e.: "Orange sea with sunset"
- Description – An explanation of this particular media. F.e.: "Place: Okinawa Beach"
- Alt Text – (Image files only) The alt text for the image, e.g. “The Mona Lisa” to describe the media. Used for accessibility. F.e.: "Sunset No. 1"
Progress so far in the MediaLibrary
Image:
File:
wouldn't it be better to use an editor or textarea for the caption and description?
I just changed the following:
- caption and description now have TextareaType
- captionLink added (Adding a CaptionLink has the advantage that the frontender can do anything with it.)
@carakas What do you think of this?