Extension Point : ITemplateStreamFilter
The ITemplateStreamFilter extension point is defined by trac.web.api. Implementing the ITemplateStreamFilter interface allows you to have complete control on the generated Genshi event stream. You can use it to change the response at runtime: you can filter out some content, modify it or even inject new content.
Since Trac 0.11, while it's still possible to customize the Genshi templates like it was for the Clearsilver ones in previous versions, this is no longer the only way, neither the preferred. What makes the use of the Genshi templating system fairly unique is that you can manipulate the generated output at run-time, in order to filter out some content, modify it or even inject new content. Among other things, leaving the original templates alone make it much easier to benefit from bug fixes and improvements made in newer mainstream Trac versions. All you need for that is to write a plugin implementing the ITemplateStreamFilter interface, which allows you to have complete control on the generated Genshi event stream.
TODO Provide detailed usage information of the extension point and implementations thereof. E.g. when is a method of the implementation being called and so on.
TODO Provide references to available implementations of the interface, for example by linking to sources in trac trunk or on trac-hacks. You might also include short discussions on how they have been implemented.
Additional Information and References
TODO Provide here additional information on the extension point interface, for example open tickets regarding the interface or existing talk on the extension point, for example links to irc back logs and so on, including also best practices when implementing/using the interface. For example, for the IEnvironmentSetupParticipant there is currently talk about always committing changes to the database when upgrading using a migration path, so that on error during the migration, the existing data will not be corrupted.