i have a site where I use display suite for custom page display. And all works. Now I need to add a custom field formatter for the “Author” field, but I don’t find how to link “author” to a new field formatter.
I know that I need to use hook_field_formatter_info() but I don’t understand which is the right value for “field types”. I have tried with “user”, “user_reference”, “text”,”author” but nothing.
I have tried to see how Display Suite define its fields formatter, but for this field the module use “2” for this value:
$fields['node']['author'] = array( 'title' => t('Author'), 'field_type' => DS_FIELD_TYPE_FUNCTION, 'function' => 'ds_render_author_field', 'properties' => array( 'formatters' => array( 'author' => t('Author'), 'author_linked' => t('Author linked to profile') ), ), );
where
define('DS_FIELD_TYPE_FUNCTION', 2);
So how can I add one new field formatter for the author field ?
Thanks.
Sponsored by SupremePR