Changes between Version 4 and Version 5 of CtxtnavAddPlugin


Ignore:
Timestamp:
May 6, 2008 12:59:42 PM (6 years ago)
Author:
coderanger
Comment:

Mark as deprecated.

Legend:

Unmodified
Added
Removed
Modified
  • CtxtnavAddPlugin

    v4 v5  
    33== Description == 
    44 
    5 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. 
     5This plugin can been obsoleted by native support in Trac. See the `trac.web.chrome.add_ctxtnav` function. 
    66 
    77== Bugs/Feature Requests ==  
     
    2020 
    2121You can check out CtxtnavAddPlugin from [http://trac-hacks.org/svn/ctxtnavaddplugin here] using Subversion, or [source:ctxtnavaddplugin browse the source] with Trac. 
    22  
    23 == Example == 
    24  
    25 Adding a link and a Javascript button to the Wiki: 
    26 {{{ 
    27 #!python 
    28 from trac.core import * 
    29 from trac.util import Markup 
    30  
    31 from ctxtnavadd.api import ICtxtnavAdder 
    32  
    33 class ExampleModule(Component): 
    34  
    35     implements(ICtxtnavAdder) 
    36  
    37     # ICtxtnavAdder methods 
    38     def match_ctxtnav_add(self, req): 
    39         return req.path_info.startswith('/wiki') 
    40  
    41     def get_ctxtnav_adds(self, req): 
    42         yield Markup("""<a href="" onclick="alert('Test'); return false">Markup test</a>""") 
    43         yield ('/timeline','Other test') 
    44 }}} 
    4522  
    4623== Recent Changes ==