Problem/Motivation
Found this when guiding a client to setup a carousel.
We had configured a multi value image field, and a multi value link field. With slick image field formatter we selected the Media switcher to be "Image linked by Link field" and the Link to be the multi value link field.
Our assumption was that if we had 5 images and 5 link values, that each delta would link to the corresponding link field delta. Only the first link value was used to link all images.
I saw there is a todo in the code - but I could not find a related issue for this feature request.
// @todo enable $delta = $blazies->get('delta');
/ @todo add option to map links to images.
Steps to reproduce
Proposed resolution
Use the delta when linking - I am not sure if this needs to be configured via another option, I guess if somebody is reusing a field for a different purpose adding this could cause regression unless it has another config flag to enable?
Remaining tasks
- Decide if this needs an explicit config flag
- Implement
User interface changes
TBC
API changes
N/A
Data model changes
N/A
Issue fork blazy-3612896
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
ericgsmith commentedAdded MR which shows the todo and from a quick test achieves what the client and I thought would be how the setting worked.
Needs maintainer input for adding additional config to check delta, and eventually test coverage when we have a clearer plan.
Comment #5
gausarts commentedI haven't checked other use cases with more complex setups: Paragraphs, Views, etc.
If any issues, we can always revisit this later.
Thanks for your contribution.