I am following this Guide: Customization | Grav Documentation
I am currently using Quark Open Publishing as Theme and would like to use it as Base-Theme.
So my new Theme-YAML looks like this:
streams:
schemes:
theme:
type: ReadOnlyStream
prefixes:
'':
- user/themes/KageCustomTheme
- user/themes/quark-open-publishing
And if I switch the Theme to my custom Theme I get this error on the Website:
The Logs say exactly the same:
Template "partials/hero.html.twig" is not defined in "blog.html.twig" at line 34.
But I can’t really do something with this Error. And Grav should actually just use the old Theme right?
I found only devtools
plugin properly creates a child theme. I never managed to make child theme work when creating step by step manually. Also never bothered to see what’s the difference between manual and CLI created themes
Good Point, but I tried it on my Server (IONOS) and doesn’t seem to work.
Will now use a Backup locally (Windows) to create it… Hopefully this works.
Nope, didn’t work at all. Still the same error as in the Screenshot attached in the Start-Post.
Can any Theme be inherited?
I’ll copy here what I was told
partials/hero.html.twig is not part of quark-open-publishing, but part of quark. Apparently, a child only looks for a template in the parent and not the grandparent.
Will be fixed, when the grandparent (quark) is added to the child’s yaml file:
streams:
schemes:
theme:
type: ReadOnlyStream
prefixes:
'':
- 'user://themes/child'
- 'user://themes/quark-open-publishing'
- 'user://themes/quark'
1 Like
This!
pffttt
Now I need to switch everything over to my newly created theme. Thanks!
Buuuttt, do I need to make sure that the Partials in my Theme get Updated when the Parent-Theme gets updated.
Or is there some Mechanism already in Place in Grav?
Not sure, but I don’t think so. When theme updates, I believe you’d need to check if any of your overwritten files were affected
1 Like
Okay thanks. Fine for me. I have the Feeling that for my Theme there wont be any Updates soon.