CU-CommunityApps / cwd_project

A starter child theme for cwd_base, providing just the basics for beginning a custom Drupal design.
1 stars 0 forks source link

Replace extends with embed/endembed #29

Closed alisonjo315 closed 7 months ago

alisonjo315 commented 11 months ago

Let's replace all instances of extends with embed/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??!?!!?!!").


Most 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