Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Theme configuration and customization

theme

Solved by pamtbaau View solution

Started by Guido 5 years ago · 2 replies · 458 views
5 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

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

@pamtbaau:

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

Regards,

Guido

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
3 99 6 hours ago
Support · by Anna, 3 days ago
2 98 1 day ago
Support · by Justin Young, 1 day ago
1 65 1 day ago
Support · by Duc , 1 week ago
2 101 6 days ago
Support · by Colin Hume, 1 week ago
2 94 6 days ago