Open ghost opened 5 years ago
IMO, (if you already in the theming) overriding layout template - most simple and powerful solution.
Here's a PR that moves Seven's header customisations from a preprocess function (that can't be undone) to template files (that can be overridden): https://github.com/backdrop/backdrop/pull/2995
@findlabnet The way Seven was doing its customisations before, it wasn't possible to override with layout templates. My PR makes it so that you can now override Seven's customisations with layout templates if needed.
PR updated for latest 1.x changes.
I'm writing a sub-theme of Seven, and I don't want the page title or tabs being displayed in the Header region. But Seven puts them there in such a way that it doesn't seem possible to remove them...
(Source: https://api.backdropcms.org/api/backdrop/core%21themes%21seven%21template.php/function/seven_preprocess_layout/1)
By appending the title and tabs as strings to the end of the
$variables['content']['header']
variable, it makes it impossible to remove using another preprocess function. I thought about maybe recreating the$variables['content']['header']
variable in my preprocess function from scratch less the title and tabs, but it seems to be too late in the chain to be possible either.Does Seven need to do it this way? Would the alternative be for Seven to override all layout templates and do it in them instead? Would that help here or not?