I want to dynamically inject a taxonomy into my page header, and use that when processing the page. More or less like the archive plugin does.
However, using onPageContentRaw or onPageProcessed appear to be too late. When adding the taxonomy then, it appears to be never processed (I checked this using {{dump(page.header.taxonomy)}} in the template.
The onBuildPagesInitialized event only runs once, and not per page.
So the question is: how can I manipulate a page's header, so that I can still use the values when processing the page?
I've already read this old thread
/forum/archive/header-injection-t7221
but that does not provide a solution.