Add links to the ctxtnav bar of other plugins
Description
This plugin provides an interface (ICtxtnavAdder) to alter the ctxtnav bar of other plugins, most notably the wiki. For those of you asking what a ctxtnav bar is, its the row of links below the main navigation bar.
Bugs/Feature Requests
Existing bugs and feature requests for CtxtnavAddPlugin are here.
If you have any issues, create a new ticket.
Download
Download the zipped source from here.
Source
You can check out CtxtnavAddPlugin from here using Subversion, or browse the source with Trac.
Example
Adding a link and a Javascript button to the Wiki:
from trac.core import * from trac.util import Markup from ctxtnavadd.api import ICtxtnavAdder class ExampleModule(Component): implements(ICtxtnavAdder) # ICtxtnavAdder methods def match_ctxtnav_add(self, req): return req.path_info.startswith('/wiki') def get_ctxtnav_adds(self, req): yield Markup("""<a href="" onclick="alert('Test'); return false">Markup test</a>""") yield ('/timeline','Other test')
Recent Changes
[903] by coderanger on 06/18/06 01:40:39
Same fix as on the 0.10 branch.
[902] by coderanger on 06/18/06 01:22:39
Oops.
[901] by coderanger on 06/18/06 01:18:29
Don't use req.href for the first path computation. (Hopefully closes #446)
Author/Contributors
Author: coderanger
Contributors: