This was a PAID request by an AMS & UBS license holder that wishes to remain anonymous.
I've marked this as Implemented in AMS 2.2.27
There is a new input that is tied to the "Display cover image above article" option, that lets you set a cover image caption.
Data is stored in the
xf_xa_ams_article table in the field
cover_image_caption. This field is a varchar(500), which should be plenty enough for a caption.
This input is part of the "Set cover image" function located in the more options for a given article as well as part of the Edit article function.
Note: The caption is simple raw text only. It will not parse HTML and BBcocde tags are stripped.
Here you can see the new input on the Set cover image overlay.
When the Display cover image above article option is unchecked, the Cover image caption is hidden (
and if saved unchecked, will remove the caption).
As mentioned above, you can also set/unset the cover image caption when editing an article.
Here you can see an article that is displaying the Article Cover Image above the article and has a Cover image caption.
As a bonus (because I wanted it), this also works for Article View Layout type.
This is the LESS/CSS used for displaying the cover image caption. You can tweak it directly in the
xa_ams.less template or use the
.amsCoverImage-caption class in
Extra.less to make changes.
HTML:
.amsCoverImage-caption
{
font-style: italic;
color: @xf-textColorDimmed;
margin-bottom: @xf-elementSpacer;
}