Modify

Opened 9 years ago

Closed 9 years ago

#3047 closed enhancement (fixed)

Use ctxtnav API

Reported by: Noah Kantrowitz Owned by: Jason Winnebeck
Priority: normal Component: ShowPathPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Rather than using a stream filter, you can just use a request filter (post-request) and alter the value in req.chrome['ctxtnav'].

Attachments (0)

Change History (3)

comment:1 Changed 9 years ago by Jason Winnebeck

Thanks for the suggestion...

Would this remove the dependency on Genshi 0.5?

What is the plugin interface name for a plugin that would do what you said above, or would this still be a ITemplateStreamFilter? And for your idea is this something that is available in Trac 0.10, or 0.11 only?

comment:2 Changed 9 years ago by Noah Kantrowitz

This doesn't require Genshi 0.5, but it does require a recent version (>=beta2) of 0.11. Trac 0.11-final will require Genshi 0.5 anyway, so don't consider that a problematic dependency. The extension point to look at is IRequestFilter, specifically its post_process_request function. You can use the template debugger in the developer plugin to see how the ctxtna data is structured, or look at the add_ctxtnav function in trac.web.chrome.

comment:3 Changed 9 years ago by Jason Winnebeck

Resolution: fixed
Status: newclosed

(In [3702]) Closes #3047, rewritten to use IRequestFilter API, probably is more efficient now

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jason Winnebeck.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.