RE: [coldbox:4872] Re: Including code at end of BODY tags

If you are not wanting to touch each and every template, I assume
announcing a custom interception point would have the same issue as
populating a certain value in the request collection and then outputting
that variable in the layout.

If you are looking to do this without touching any more code than you
absolutley have to, I would recommend defining an interceptor that
listened for the preRender interception point. It will give you the
renderedContent intercept data which you can then parse through looking
for the </body> tag and modify it as you wish.


Brad: So far, the most plausible option.

And just so everyone knows, this isnt a case of me not wanting to
modify templates and do extra work -- in fact, quite the contrary. I
know I'm being overly vague here, but in essence we have hundreds of
layouts all managed and designed by another team here who are not very
"technical" (i.e., not ColdFusion experts). They are great at HTML/CSS
markup and have a lot on their plate as it is, so asking them to
remember to now include another ColdBox snippet in all their layouts
is just not a practical option. So we wanted a way to add what we
needed at a core level.

Ill take a look at the preRender intercept option which wishing for a
CFHTMLBODY tag from Adobe. In the meantime I had to roll with a custom
layout renderer to do just that -- parse the generated content to add
things to the output where I needed them.