Module file
/** * Implements hook_theme(). */ perform mymod_theme($present, $sort, $theme, $path) { return [ 'views-view-fields--myview' => [ 'variables' => [ 'description' => [], ], ], ]; }
This works. My custome template is loaded for Drupal Development view. When I attempt to load multple templates, it doesn’t work, ie.
/** * Implements hook_theme(). */ perform mymod_theme($present, $sort, $theme, $path) { return [ 'views-view-fields--myview' => [ 'variables' => [ 'description' => [], ], ], 'views-view-unfortmated--myview' => [ 'variables' => [ 'description' => [], ], ], ]; }
I’ve a number of views twigs I’m attempting to incorporate with my module. What’s Drupal Development appropriate means. Thanks
Edit, I realised Drupal Development second was inflicting an error resulting from syntax.
Nonetheless I used to be mistaken, then template is not loaded.
How can I get my customized views templates to load when included with a module? thanks
Edit 2,
So I modified all dashes (-) to underscores (_).
Now Drupal Development template works, however none of Drupal Development views fields are displaying. How can I go Drupal Development views fields via? Thanks