-
Notifications
You must be signed in to change notification settings - Fork 0
Drupal
Marie-Louise edited this page Aug 9, 2018
·
56 revisions
Everything Drupal!!
Using a Base theme and create a new sub-theme
the child theme is the one which you change to override the base theme
Naming conventions
block--[module]--[delta].html.twig
....
Drupal needs the naming conventions to look for the right template, so for example it will look for a block based on the naming convention.
So it will allow the dev to target this particular block for customisation (similar to how an ID is targeted in styling languages).
Its good practice to separate the templates into different directories also its good practice to use the comments in each file
Nodes Patterns
node--[type|nodeid]--[viewmode].html.twig
to add a function to the second block {{label|upper}}