Psuedo fields are a great way to display dynamic content to fieldable
entities. The idea is simple, register the field with hook_field_extra_fields()
and build the field display with hook_entity_view().
Register the Field
This will simply register a pseudo field called example_field that will
only be applicable for pages. Simple stuff.
Build the Field Display
You will need to hook into hook_entity_view() to build the field
display. Here is a contrived ‘Hello World’ example:
Field Display Callback
Personally, I like to create a separate function to handle the field
I am still trying to find a graceful way to add configurable settings
for pseudo fields (manage display). This is a bit of draw back because
you may want to contextually alter a field’s configuration without hard