1
vote
Hook post update not found
Sounds like you want to run update hooks on a newly installed module. Then you should use deploy hooks. Other then update and post-update hooks they run also for newly installed modules. The only ...
- 17k
1
vote
Attaching a library to only one custom module
You can't attach libraries from module info files. That only works for themes. And yes, if you attach in the page attachments hook without any other condition on the URL or whatever it will be added ...
- 17k
1
vote
Accepted
Attaching a library to only one custom module
There's a few different ways of doing this, depending on how you're building /juniper.
If you have a controller that is returning a render array, you can include something like $build['#attached']['...
- 26
1
vote
Accepted
Module template for a comment field is not triggering comment_preprocess_field
Use base hook, instead of base_hook (no underscore):
function MODULE_theme() {
return [
'field__field_FIELD_NAME' => [
'base hook' => 'field',
]
];
}
That should invoke the ...
- 165k
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
hooks × 26407 × 876
8 × 538
theming × 402
nodes × 284
forms × 283
views × 256
entities × 219
users × 184
routes × 113
blocks × 84
6 × 83
webforms × 67
commerce × 60
database × 52
javascript × 51
navigation × 46
taxonomy-terms × 44
ajax × 42
files × 41
media × 37
9 × 37
emails × 34
search × 33
caching × 27