Setting a global var inside the base template was one of the first things I tried. Unfortunately it does not work.
According to this answer it’s not possible to do this template-wise, without passing the variable as an argument when including partials. (Dynamic global variable)
Extending twig_vars
inside my theme.php
does work in fact. I just had a look at how it’s done at Gravs’ default theme quark
, but I don’t know how to get page.find('/images')
to work inside the theme.php