I have 2 themes, both enabled, assume they are called my_first_theme
(default) and my_second_theme
. I have /whatever
path and lots of the pages under this path, and I have a theme negotiator, which sets my_second_theme
as an active one for any page under this /whatever
path, including nodes, views, custom controllers etc.
So far it works good.
Problem is, when 404 or 403 is triggered, the theme used to generate the response is always the default one (my_first_theme
).
What I need is when 404 or 403 response is generated for any path under /whatever
path, I would like the my_second_theme
to be used for those templates, not the default one. The only way to achieve it at this moment I see is that I create a copy of the frontend stuff under my_first_theme
just to be used for 404 and 403 purposes, but that's definitely a dirty way to do that. Basically I will have a clone of my_second_theme
assets under the my_first_theme
folder just to serve 404 and 403 responses.
Few examples of what I would like to achieve:
/nonexistent404
- my_first_theme
used
/exists/but/access/denied403
- my_first_theme
used
/whatever/nonexistent404
- my_second_theme
used
/whatever/path/exists/but/no/access403
- my_second_theme
used