It seems like the Display Suite module completely ignores hook_preprocess_node()
and hook_process_node()
. Is this the case?
If it is so, what is the way to make minor changes to the final rendering with access to all the node variables?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityIt seems like the Display Suite module completely ignores hook_preprocess_node()
and hook_process_node()
. Is this the case?
If it is so, what is the way to make minor changes to the final rendering with access to all the node variables?
Display Suite does indeed hijack the node rendering to a point where the default preprocess functions may not be used.
The module comes with a set of its own preprocess functions that are documented in ds.api.php.
In this case, hook_ds_pre_render_alter()
can be used instead of the hook_preprocess_node()
to modify the output via the complete render array. Also, the $entity
object is available with all values.