{"issue":{"created_at":"2011-11-29T20:20:26Z","state":"open","updated_at":"2011-11-29T20:20:27Z","user":{"gravatar_id":"256406243346b9253f8610fb1d1e05f6","id":1215373,"url":"https://api.github.com/users/importer","avatar_url":"https://secure.gravatar.com/avatar/256406243346b9253f8610fb1d1e05f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"importer"},"comments":1,"body":"My apologizes if this has been brought up before -- it came up in the forums but I could not find a related issue here.\n\nCurrently, 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.\n\nIt 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.\n\nThe 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.\n\nI've tested this solution and it does indeed work, but I don't know if there are any implications that I'm unaware of.\n\nThank you!\n\n[Download the attachments](http://www.contao.org/tl_files/tickets/2816.zip \"Download the attachments of this ticket\")\n\n--- _Originally created by Medianomaly on January 20th, 2011, at 05:18pm (ID 2816)_","assignee":null,"id":2392113,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":2816,"labels":[{"name":"Feature","color":"4183c4","url":"https://api.github.com/repos/contao/import/labels/Feature"},{"name":"frontend","color":"e6e6e6","url":"https://api.github.com/repos/contao/import/labels/frontend"}],"title":"InsertTags and outputFrontendTemplate","closed_at":null,"html_url":"https://github.com/contao/import/issues/2816","url":"https://api.github.com/repos/contao/import/issues/2816","milestone":null},"action":"created","comment":{"created_at":"2011-11-29T20:20:27Z","updated_at":"2011-11-29T20:20:27Z","user":{"gravatar_id":"256406243346b9253f8610fb1d1e05f6","id":1215373,"url":"https://api.github.com/users/importer","avatar_url":"https://secure.gravatar.com/avatar/256406243346b9253f8610fb1d1e05f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"importer"},"body":"EDIT:\n\nThe solution could be to replace all instances of $strBuffer in line 111 of FrontendTemplate.php with $this->strBuffer, then moving lines 105-115 to below line 164.\n\n--- _Originally created by Medianomaly on January 20th, 2011, at 06:30pm_","id":2945833,"url":"https://api.github.com/repos/contao/import/issues/comments/2945833"}}