0

Looking at the page of hook_field_formatter_view, the explanation for $display is:

The display settings to use, as found in the 'display' entry of instance definitions. The array notably contains the following keys and values;

But I just found out that the $display variable does not hold accurate information.

This is what's inside my $instance (correct settings) instance settings

This is what's inside my $display (default values for settings) enter image description here

I could overwrite $display from the $instance settings, but I can't figure out in which variable the current view mode is stored, so that I can grab the settings for the correct view mode.

As a little background info, this is a custom field with a custom formatter. Has anyone had similar issues with a custom field/formatter?

1 Answer 1

1

This wasn't really a problem. This was because the page was a Panels page, and the field was added into the panel page with its own formatter settings.

Solved by setting the correct field formatter settings on the panel page.

It's one of d'ohs days.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.