Edgewall Software
Modify

Opened 16 years ago

Last modified 14 years ago

#7898 new enhancement

[PATCH] Keep NavigationContributor Ordering

Reported by: anonymous Owned by:
Priority: normal Milestone: next-major-releases
Component: general Version: 0.11-stable
Severity: normal Keywords: navigation, patch
Cc: Thijs Triemstra Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I have a small patch which applies against both 0.11-stable (r7236) branch and the trunk (r7768). It updates the use of INavigationContributors, so if one contributor returns more then one navigation item the order they are returned in is retained when they reach the main/meta navigation bar. This is of course over-ridden by the *_order settings in the configuration file.

The justification for this patch is that some plugins may wish to dynamicly generate navigation items which are perhaps based on user supplied wiki content. The order of the navigation items could be significant, so its bad to throw it away. Since the items are generated dynamically it makes adding the order to the trac.ini file impractical.

The patch includes a unit test, and an update the INavigationContributor interface documentation. I also think ticket #3695 has a little bit of bearing on this.

Attachments (1)

nav_order.patch (2.7 KB ) - added by Game_Ender 16 years ago.
Patch which implements above feature, applies against trac-0.11 stable (r7768) and trunk (r7236)

Download all attachments as: .zip

Change History (4)

by Game_Ender, 16 years ago

Attachment: nav_order.patch added

Patch which implements above feature, applies against trac-0.11 stable (r7768) and trunk (r7236)

comment:1 by Game_Ender, 16 years ago

Just to make clear, I posted the ticket above :), forgot to put my user name in.

comment:2 by Remy Blank, 15 years ago

Milestone: 0.12next-major-0.1X

comment:3 by Thijs Triemstra, 14 years ago

Cc: Thijs Triemstra added
Keywords: patch added
Summary: Patch to Keep NavigationContributor Ordering[PATCH] Keep NavigationContributor Ordering

This patch needs a review.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.