Theme configuration and customization

Hi folks,

I’m new to Grav. I’m using Grav v1.7.0-rc.20 with Photographer Skeleton.

I’d like to perform some changes in file gallery.html.twig located in
/user/themes/photographer/templates .

Having read the hints in https://learn.getgrav.org/17/themes/customization and https://learn.getgrav.org/17/themes/theme-configuration I don’t want to modify the themes orignal files but copied the file gallery.html.twig to new location /user/config/themes/photographer/templates and performed the changes there.

But, the changes don’t work. Only if I change the original file located at /user/themes/photographer/templates the changes work.

What’s going wrong? Did I misunderstand s.th.?

Thanks in advance,

Guido

Hi @guido, When you want to override and customise a theme’s template file, you should create an inherited theme and copy the template file into the same template folder of the child theme.

For example, if you have created an inherited theme called ‘mytheme’:
File /user/themes/photographer/templates/gallery.html.twig should be copied into /user/themes/mytheme/templates/

1 Like

@pamtbaau:

Thx a lot, now it works as expected - great!

Regards,

Guido