To simplify this issue, I just have 2 hooks:
1. customtheme_preprocess_paragraph__registration_button()
2. customtheme_preprocess_paragraph__registration_button__default()
When I access a node with a registration button with a default view mode, only the first hook is called.
Also, when I access the $variables['view_mode']
in that hook, it gives the value 'default'.
Furthermore, it only takes the paragraph--registration-button.html.twig as template, but not paragraph--registration-button--default.html.twig
I am using Drupal Core 9.5.4 and Paragraphs 1.15.0.
Could this be something in my setup?
Closed: works as designed
1.0
Code