Created
March 19, 2022 13:06
-
-
Save vishalbandre/01bdcae0510d7831291e292a99a37a39 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy template inside the templates directory in your module. | |
Then, reuse this snippet as per your overriden template. | |
Example: | |
If you want to override template: page--taxonomy.html.twig | |
1. Copy the template inside your modules templates directory. | |
2. Register it with your module preprocessor. i.e. <module_name>.module. | |
/** | |
* Implements hook_theme(). | |
*/ | |
function hashtags_explore_theme() { | |
return [ | |
'page__taxonomy' => [ | |
'template' => 'page--taxonomy', | |
'base hook' => 'page', | |
], | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment