Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Theme configuration and customization

theme

Solved by pamtbaau View solution

Started by Guido 6 years ago · 2 replies · 670 views
6 years ago

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

6 years ago Solution

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
6 years ago

@pamtbaau:

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

Regards,

Guido

Suggested topics

Topic Participants Replies Views Activity
Support · by webmasterodp, 1 week ago
4 167 1 week ago
Support · by nwhitfield, 1 week ago
2 143 1 week ago
Support · by stell, 3 weeks ago
5 376 2 weeks ago
Support · by gravinator, 1 month ago
5 571 2 weeks ago
Support · by Gravver, 3 weeks ago
6 355 3 weeks ago