Confluence Docs 2.10 : Confluence UI architecture
This page last changed on Jun 06, 2008 by mryall.
Rendering frameworksThere are two frameworks that do the template rendering in Confluence: Webwork and Sitemesh. The confusing bit is that both of them use Velocity as their templating engine. We try to distinguish them by using *.vm for templates processed by Webwork, and *.vmd for those processed by Sitemesh. Rendering contextsThere are four different Velocity contexts used in Confluence:
The two Sitemesh contexts are pretty much the same, but the Webwork velocity context contains a lot more stuff than either of the Sitemesh ones. Logical structureThe following diagram shows the logical structure of the Confluence UI.
Rendering pipelineThe following diagram shows the flow of control through the Confluence UI.
In more detail, the flow of control goes:
You can find out which beans are in which context by looking in the classes above. A full list would be too long to include here. Note that even though the ApplyDecoratorDirective launches a Sitemesh decorator template, the Sitemesh template doesn't get automatic access to the Velocity context. The only bits that are passed through are done with the #decoratorParam() directive. Wow, pretty complicated. But it lets us do cool stuff like implement custom themes, apply layouts and more. Sample pageBelow is a sample decorated page with the templates responsible for the rendering indicated.
![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
Document generated by Confluence on Dec 03, 2008 15:13 |