Hi Tim, Can't think of anything off the top of my head.
Maybe we need to add a "TransformPageEventHandler" to allow post-processing? You might look at the IncludeEventHandler, which allows you to change the included template path when #include or #parse is called. This isn't quite what you want, but maybe you could come up with something clever. (like changing to a wrapper page of some sort that loads the original template via a template path stored in the context). WILL On Dec 3, 2007 7:37 AM, White, Tim <[EMAIL PROTECTED]> wrote: > Hi there- > > I'm trying to figure out the cleanest way to add a post-render debug > mode to velocity. > > What I need to have happen, is that every time a template is output, I > need to insert some HTML at the top of the file if some param in the > request enables debug mode. > > This includes whenever something is brought in via #parse or #include. > I think this could happen with Events, but I wasn't completely clear on > how. > > I'm not using VVS in this app, just the 1.4 engine. > > For example: > > mergeTemplate(template1.msg) > > template1 looks like this: > > <template 1 contents> > #parse("template2.msg") > > > Desired HTML: > > <!--DEBUG: This is template1.msg --> > <template1 contents> > <!--DEBUG: This is template2.msg --> > > > Short of adding a macro to the top of every template, is there a way to > have Velocity inject this for me? Is there a var for the current > template name? > > Thanks! > > Tim > > > This communication is the property of Qwest and may contain confidential > or > privileged information. Unauthorized use of this communication is strictly > prohibited and may be unlawful. If you have received this communication > in error, please immediately notify the sender by reply e-mail and destroy > all copies of the communication and any attachments. > -- Forio Business Simulations Will Glass-Husain [EMAIL PROTECTED] www.forio.com