Edgewall Software
Home
Trac
Trac Hacks
Genshi
Babel
Bitten
Home
Download
Documentation
Mailing Lists
License
FAQ
Search:
Login
Preferences
Help/Guide
About Trac
Wiki
Timeline
Roadmap
Browse Source
View Tickets
New Ticket
Search
Context Navigation
-1
Start Page
Index
History
Editing TracDev/PluginDevelopment/ExtensionPoints/trac.web.api.ITemplateStreamFilter
Adjust edit area height:
8
12
16
20
24
28
32
36
40
Edit side-by-side
== Extension Point : ''ITemplateStreamFilter'' == ||'''Interface'''||''ITemplateStreamFilter''||'''Since'''||[milestone:0.11 0.11]|| ||'''Module'''||trac.web.api||'''Source'''||[source:trunk/web/api.py#L105]|| {{{ #!comment table header is a good idea, just try to make it as compact as possible, especially module and source of it will fit nicely }}} 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. == Purpose == 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. == Usage == 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. == Examples == * [source:trunk/tracopt/ticket/clone.py] == Available Implementations == 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.
Note:
See
WikiFormatting
and
TracWiki
for help on editing wiki content.
Change information
Your email or username:
E-mail address and name can be saved in the
Preferences
Comment about this change (optional):
Note:
See
TracWiki
for help on using the wiki.