Theme Inheritance with Quark theme and 1.4.0-beta.3


#1

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?


#2

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


#3

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.


#4

It ‘should’ work, but this has not been tested yet. I’ll make sure I test it before the official release.


#5

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…


#6

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:

<?php
namespace Grav\Theme;

use Grav\Common\Theme;

class myTheme extends Quark
{
}
?>

More info at: https://learn.getgrav.org/themes/customization#theme-inheritance

Does doing the same solve your issue?


Theme Problem with Quark Inheritance
#7

Hi @paulhibbitts — that works perfectly so far, many thanks…!


#8

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 :

<?php
namespace Grav\Theme;
use Grav\Common\Theme;
// class Mytheme extends Antimatter
class Mytheme extends Quark
{
   // Some new methods, properties etc.
}
?>

and my mytheme.yaml :

streams:
 schemes:
   theme:
     type: ReadOnlyStream
     prefixes:
       '':
         - user/themes/mytheme
         # - user/themes/antimatter
         - user/themes/quark 

Any idea ? Thanks in advance !


[Solved]Switch child theme from Antimatter to Quark
#9

The solution is to copy the content in the quark.yaml to mytheme.yaml and then put the streams