But back to the main problem: I tried following things. Both of them are not deliver the right solution. This two examples comes into my hook. The main thing is to get the new content of the homepage in the site.update:after hook.
I don’t think there is any point in pursuing this approach any further, as it just doesn’t work. Maybe you can post the code in your home controller and template (and the corresponding class you are using there), so that we might find a better way to deal with that.
Having said that, you could trigger a page.update.after hook from your site hook, passing on the data you need via the named arguments or a session variable.
But in general, I’m not convinced that this approach of rendering a page to create a file is a good one.
My class collecting stylings from the rendered pages. With the end of the rendering process, my Stylewirter class ran across the jordan and i don’t have access to the collected styles anymore. And therefore: Nothing to write in the hook
I need to write the stylings right before the end of my template. This i do with the <?php $sw->seal() ?>
statement. How else could i output the data? I rather avoid to touch the php buffers, just to escape a json with my information.
Yes, ok, I understand what you are doing there. IMO, this seems to produce a lot of overhead every time the page is rendered. But as you say, it’s experimental.
Thats True. Therefore i’m passing the sw_render bool, that prevent the converting and writing stuff only from the hook. Otherwise we having the cache…
I don’t want to extend this topic artifically. But is it true, that the page is no longer cacheable when a variable in the site controller is set?