On 15 September 2010 17:57, Dmitry Samersoff <d...@samersoff.net> wrote: > Hi Everyone, > > I need to add some extra menus right below mainnav according to trac.ini > data and current user permissions and I'm writing a plugin for > this purpose. > > What is the best way to do it? > > Should I implement ITemplateProvider? > > How I can add something like: > > <div id="navcontainer"> > <ul id="navlist"> > <li id="active"><a href="#" id="current">Item one</a></li> > </ul> > </div> > > to the output? > > Any advise is much appreciated. > > -Dmitry
You can inject some arbitrary HTML into any template that already exists by implementing the ITemplateStreamFilter interface. One of my plug-ins uses this interface to inject a <script></script> tag into the ticket template: http://www.matbooth.co.uk/trac/browser/trunk/ticketvalidation/ticketvalidation/rules.py#L163 You may need to see the Genshi documentation to decipher the meaning of everything there: http://genshi.edgewall.org/ Regards, Mat -- Mat Booth -- You received this message because you are subscribed to the Google Groups "Trac Development" group. To post to this group, send email to trac-...@googlegroups.com. To unsubscribe from this group, send email to trac-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en.