I have a custom module that is formatting the display of an image field, which can accept multiple values.
I would like to know what hook I should use to duplicate the first value of the field (e.g. "[image1]"), and add it back to the beginning of the array (with
array_unshift() I guess) before the rest of my functions format the display/theme of the field.
So what was
I am then going to theme them separately, but I think I already have that part figured out.
I am currently using
hook_field_formatter_view(), and have tried to just add it to the beginning of the
$items array at the top of the function, but that didn't seem to work. If I immediately
$items array after this it shows, but only 3 items get output; I am assuming that the number of field gets determined elsewhere.
hook_field_formatter_viewbut it only runs once per image.