How to make changes to twig files

Hello everyone,

I would like to make a couple of changes in Cern template in order to respond to our site’s needs. Apart from css changes, which are well explained in CERN Override Theme documentation, I will need to make changes to twig files.

After reviewing the above documentation and the cern theme’s repository, it’s not clear for me where twig files are located and how to make changes to them. I read that most of twig files are normally located under core/modules/system/templates folder, but I think I don’t have access to it through WebDAV.

It would be great if you can explain me how I can locate and make changes to twig files.

Thanks in advance,
Ioannis Batas

Hi Ioanni,

Most of the templates are in the CERN base theme (https://gitlab.cern.ch/web-team/drupal/public/d8/themes/cernbase/tree/master/templates)

Download the CERN Base theme, create a templates folder in your override theme and copy there from the Base theme the twig templates that you want. Then you can modify them.