Richard, This question has been asked many times over on velocity-user.
In summary, make a tool, put it in the context and use the evaluate method of the Velocity runtime See countless messages like below by searching the archives: http://www.mail-archive.com/[email protected]/msg06803.html http://www.mail-archive.com/[email protected]/msg07097/VelocityToo l.java http://www.mail-archive.com/[email protected]/msg07097/velocityTo olTest.vm -Peter ----- Original Message ----- From: "rpiper" <[EMAIL PROTECTED]> To: "Turbine Users List" <[EMAIL PROTECTED]> Sent: Sunday, May 26, 2002 2:35 AM Subject: Parsing velocity code within a velocity screen. > I would like to be able to parse velocity code from a string, rather > than a vm template. > So rather than: > > #parse("filename.vm") > > do something like: > > #evaluate(" This is a $test, of velocity ") , where say $test is a > string object on the context. > > I would be grateful for any suggestions. > > Basically I want to store the navigation templates in a database, and > therefore need to be able to evaluate > these from within other navigation or screen templates as a string > (rather than template file), retrieved from a database.. > > thanks > > Richard > > -- > Richard Piper > > http://icu-web.org > mail:[EMAIL PROTECTED] > > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
