Problem/Motivation
Implements subentity_theme_suggestions_alter to add these suggestions :
- subentity__SUBENTITY_TYPE_ID
- subentity__VIEW_MODE
- subentity__SUBENTITY_TYPE_ID__VIEW_MODE
Steps to reproduce
When using twig to customize display, suggestions are helpful.
Proposed resolution
Implements hook.
User interface changes
No.
API changes
No.
Data model changes
No.
Issue fork subentity-3364453
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
maxpahComment #4
maxpahComment #5
anfor commentedHi MaxPah,
It would be more interesting to directly use the hook_theme_suggestions_HOOK.
Regards,
Comment #6
maxpahHi anfor,
With subentities hook variable is not equal to "subentity" but is equal to $subentity->bundle().
Let's stay with hook_suggestion_alter.
Comment #7
anfor commentedThanks
Comment #9
maxpah