(There are official documentation links in that write-up.)
AND, while we're in there:
Let's add the cwd_base namespace to the file references -- h/t a helpful person on Drupal Slack for digging up this link, I was at a loss ("why are these file references working??!?!!?!!").
Let's replace all instances of
extends
withembed
/endembed
Embed is more flexible and easier to use (simply because it's not as easy to break/whitescreen yourself as
extends
is).I don't have a third-party link to explain the differences, I only have the thing I wrote myself: https://github.com/alisonjo315/alison-randomness/blob/main/twig/reusing-templates.md
(There are official documentation links in that write-up.)
AND, while we're in there: Let's add the
cwd_base
namespace to the file references -- h/t a helpful person on Drupal Slack for digging up this link, I was at a loss ("why are these file references working??!?!!?!!").cwd_base/node.html.twig
is called auto-namespacing, and it's going away in D11): https://www.drupal.org/project/drupal/issues/3144443Most instances of
extends
are in node templates, i.e. https://github.com/CU-CommunityApps/cwd_project/blob/4af8fab9447256f0525c3b692f6cc87e470dcbd0/templates/news/node--news.html.twig#L1