Adding Dynamic Content into Rhythmyx templates

Hi Guys

With the introduction of velocity templates developers are able to add server side code into rhythmyx templates.

Can anybody tell me where in the documentation the process for this is explained?

Also if you have done this before can you give me an indication of the limitations around this functionality.