Closed nmeri17 closed 1 year ago
Hi, sorry for the late reply.
It isn't documented that theme defined methods will have precedence over whatever is written in a layer class
That's not true - or at least it shouldn't be. If you make a layer plugin the function in the plugin will run instead of the one in the theme. However if you have multiple layers, one may override another. In your layer you should call parent::method();
if you want to append to the theme's content.
In the general case, there isn't a way to extend themes. The only way is to duplicate the theme entirely and change what you need.
I'm having trouble modifying sections of the code controlled by SnowFlat theme from my plugin. The theme just calls
$this->method
, instead of delegating to the layer stack which would cause my layer to run. It isn't documented that theme defined methods will have precedence over whatever is written in a layer classAnyway, I want to convert my layer into a theme, but without overriding all the styling of SnowFlat. Unfortunately, it just enables my new theme but doesn't seem to execute its qa-theme class. At the top of it, I have
The above neither works nor throws any error. I can't var_dump but I know the class doesn't run since it throws no error when I put a deliberately wrong path
How do I fix this?