contao/test — Issue #2816: InsertTags and outputFrontendTemplate
Author: importer
Created: 2011-11-29 10:22:22+00:00
State: open
Labels: Feature, frontend

My apologizes if this has been brought up before -- it came up in the forums but I could not find a related issue here.

Currently, the outputFrontendTemplate hook fires BEFORE any insertTags are replaced. Therefore if you want to make a one-time modification to the HTML before it is outputted to the browser, it will have no effect on anything (like modules) that have been inserted via insertTags.

It would be very useful if the outputFrontendTemplate hook was fired AFTER insertTags were replaced, or perhaps if there could be a new hook that achieves the same thing, like 'insertTagsReplaced' or something.

The solution could be as simple as replacing the first parameter in line 111 of FrontendTemplate.php, $strBuffer, with $this->strBuffer, then moving lines 105-115 to below line 164.

I've tested this solution and it does indeed work, but I don't know if there are any implications that I'm unaware of.

Thank you!

[Download the attachments](http://www.contao.org/tl_files/tickets/2816.zip "Download the attachments of this ticket")

--- _Originally created by Medianomaly on January 20th, 2011, at 05:18pm (ID 2816)_