I'd like to add a local caption to images in atom reference fields - similar to how you can override the caption of embeded atoms. What do people think about adding this to Scald?

I image it'd be a field below the atom reference field.

Comments

gifad’s picture

Status: Active » Needs review
StatusFileSize
new2.76 KB

Hi bjalford,

I'd like this caption too, so here is a minimalistic patch to implement it...

Warning:
This patch adds a column to the field table(s) : so

  1. backup your database first
  2. visit "Run Updates" after applying the patch
gifad’s picture

new patch with a label, more comprehensive markup to make theming easy, and automatic preset of caption with dropped atom's title…

jcisio’s picture

Status: Needs review » Closed (won't fix)

This patch changes the field formatter and does not solve the general problem. To add customized data (e.g. caption), I can think of a few solutions:

1. Another field type, instead of modifying atom_reference
2. Use field_collection

Both require customized field formatter to take into account of the customized data. I think we could write a contrib module for 1/ (and later have scald_gallery use it), but it's out of scope of Scald core. We can however, if necessary, extend Scald core e.g. conventionally accept some special settings in $options in the render pipeline: $options['overriden'] = ['title' => 'Customized title'] so that this contrib module can reuse the current players.

gifad’s picture

yes, and I'd add a theme function for the final rendering...

This patch ... does not solve the general problem

but bjalford just asked a caption for his images...