I’m using 1.4.0-beta.3 and the new Quark theme, and having issues with theme inheritance. It doesn’t seem to inherit the quark theme after following the directions for setting up an inherited theme (https://learn.getgrav.org/themes/customization).
Are there new steps that need to be followed for this?
did you create your theme with devtools? If so you might need to change the order of the themes.
See this github issue: https://github.com/getgrav/grav-plugin-devtools/issues/9
I didn’t use devtools, so they are ordered correctly, I think. I just found duplicate lines of code under a theme.yaml file in users/config/themes/. I removed it and it’s working but does not inherit any of the page classes from Quark.
For now, I’ll stick with an older theme for the inheritance.
It ‘should’ work, but this has not been tested yet. I’ll make sure I test it before the official release.
Using the new beta 1.4.0-rc.1
tried making a new theme with inheritance from Quark and got these two errors…
Template “@images/grav-logo.svg” is not defined in “partials/base.html.twig”
at line 42.
and at line 96
Solved the issue temporarily by directly linking the image lie this…
Hi @dezbat, I just tried this and the error seems to be avoided if you use the
Quark as the named theme to extend in your mytheme.php file:
class myTheme extends Quark
More info at: https://learn.getgrav.org/themes/customization#theme-inheritance
Does doing the same solve your issue?
Hi @paulhibbitts — that works perfectly so far, many thanks…!
Got the same problem, and even with this fix it does not change , i still have a blank html with only my content but not the style. I was with antimatter before and want to switch my inheritance to quark. I tried to put directly quark and it’s working.
Here is my mytheme.php :
// class Mytheme extends Antimatter
class Mytheme extends Quark
// Some new methods, properties etc.
and my mytheme.yaml :
# - user/themes/antimatter
Any idea ? Thanks in advance !
The solution is to copy the content in the quark.yaml to mytheme.yaml and then put the streams
I try to name mytheme by another name, let’s bob
I thought I simply have to replace every mytheme by bob but apparently I miss a detail because when I switch to bob Grav give me this error : Template “@images/grav-logo.svg” is not defined in “partials/base.html.twig” at line 44.
so inside ./theme/bob I have
blueprint.yaml which contain :
description: "Extending Quark"
bob.yaml which contain :
bob.php which contain :
class bob extends Quark
and css/custom.css which is empty
So for now I turn with mytheme and everything is fine
but if someone knows how to personalise his identity I’ll take it
It doesn’t work for me. I’ve used both @paulhibbitts mytheme.php and your suggestion to include quark.yaml in mytheme.yaml. But still an error:
Template "modular.html.twig" is not defined..
# tree mytheme/
│ ├── favicon.png
│ └── grav-logo.svg
3 directories, 5 files
How come this doesn’t work? While the documentation and the solutions point to a working solution. Did something change with Grav 1.6.4? I never tried this with older releases.
Hi @AquaL1te, is this for Quark? I ask because I see
antimatter in the stream rather than quark…
@paulhibbitts well spotted! That was from yesterday, I was trying the same thing with different themes. I’ve changed that critical detail with the already present mytheme.php. It somewhat works now. I don’t get the error anymore, but the theme doesn’t look the same as loading vanilla theme.
Website with vanilla theme and the website with inheritance (but without any modifications). However, the grav-logo.svg and favicon.svg should replace the standard Grav logo’s, this is not the case at the moment. It’s a modular page in those screenshots.
Could it be that this theme not yet fully ready for inheritance? Since the mytheme.php also seems to be a quick fix.
EDIT: After loading the theme again, it seems to work! However, the icons are still unchanged. But will check this out in more detail. For now it seems okay. Thanks!
Glad you got things going @AquaL1te! As you develop be sure to clear the cache when testing changes or just turn off the cache (both) during development via the system.yaml file https://learn.getgrav.org/basics/grav-configuration#system-configuration