All pastes #1716195 Raw Edit

Miscellany

public text v1 · immutable
#1716195 ·published 2009-12-15 20:49 UTC
rendered paste body
"""
foo:
a plugin for Trac
http://trac.edgewall.org
"""

from trac.core import *

from trac.web.chrome import INavigationContributor

class foo(Component):

    implements(INavigationContributor)

    ### methods for INavigationContributor

    """Extension point interface for components that contribute items to the
    navigation.
    """

    def get_active_navigation_item(self, req):
        """This method is only called for the `IRequestHandler` processing the
        request.
        
        It should return the name of the navigation item that should be
        highlighted as active/current.
        """

    def get_navigation_items(self, req):
        """Should return an iterable object over the list of navigation items to
        add, each being a tuple in the form (category, name, text).
        """