Confluence 2.7 Temp Archive : Velocity Context Plugins
This page last changed on Jan 17, 2007 by jnolen.
Velocity Context plugin modules enable you to add components to Confluence's velocity context, making those components available in templates rendered from decorators, themes, XWork actions or macros.
Velocity Context Plugin ModuleEach component module adds a single object to Confluence's default velocity context. This context is the collection of objects that are passed to each velocity template during rendering of macros, decorators, themes and XWork actions. This allows you to create helper objects that perform tasks too complex to represent in Velocity templates. The objects are autowired by Spring before being added to the context. Here is an example atlassian-plugin.xml file containing a single velocity context module: <atlassian-plugin name="Sample Component" key="confluence.extra.component"> ... <velocity-context-item key="myVelocityHelper" name="My Plugin's Velocity Helper" context-key="myVelocityHelper" class="com.example.myplugin.helpers.MyVelocityHelper" /> ... </atlassian-plugin>
|
![]() |
Document generated by Confluence on Dec 20, 2007 19:02 |