Edgewall Software
Modify

Opened 19 years ago

Closed 18 years ago

Last modified 15 years ago

#2060 closed enhancement (fixed)

alter entries in metanav and mainnav?

Reported by: jgater@… Owned by: Christian Boos
Priority: normal Milestone: 0.11
Component: general Version: 0.9b1
Severity: normal Keywords: custom navigation
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I understand that it's by design that removing entries from the metanav and mainnav options in trac.ini simply moves the entries to the end of the relevent menus. (i.e. only changes the order)

Is there any way to alter the shown text of these entries or hide metanav entries without simply replacing them with static html in the templates? I know I can hide the mainnav entries by removing the permission to see them in trac-admin for the anonymous user, but can't hide, for example, the Help/Guide link in metanav.

I'd also like to rename say, the mainnav wiki button to something more directly related to its task, such as 'Home'.

If there is no simple way to edit these entries, where is the information stored, and could it be made more accessible?

Thanks in advance (and for an excellent piece of software), and hope this isn't a stupid question!

Attachments (0)

Change History (9)

comment:1 by Emmanuel Blot, 19 years ago

Priority: normallow
Severity: normaltrivial

I think it would help to post this kind of question to the ML first

The entry in the trac.ini file is to define a specific order for enumerated components. Components that are not enumerated in the trac.ini entry list are added in the order they are loaded.

Metanav and mainnav entries are generated by the different components that implement the INavigationContributor interface (see get_navigation_items() method).

I guess that you want to edit the matching Python file to rename such items.

You can also disable a component if you do no want a feature to be used in your environment. This can be done with the help of an trac.ini entry as well.

comment:2 by jgater@…, 19 years ago

Thanks for the info. I think modifying the python sources is a little bit deeper than I want to go at the moment, so I've hard-coded renamed links into the template header. I lose the automatic-appearing buttons based on priviledges, but I can live without that for the moment, and may knock something up in javascript later (I'm a lot more familiar with js and php than python!)

I'll leave it up to you whether you want to close this, or leave it as a minor enhancement request for later to make a more templatey friendly way of altering the metanav and mainnav entries.

comment:3 by jgater@…, 19 years ago

For the record, I'm using the system as a joblist for an IT support department, rather than as a sourcecode bug-tracker. Works a lot better (especially with the combined wiki) than anything else I've tried! You can see it at http://itsupport.clayesmore-access.com/support if you've any particular interest in seeing it live in such an application.

Best of luck with future work on trac, it's appreciated.

comment:4 by anonymous, 19 years ago

I agree with this entry and will take it a bit farther. The mainnav should be customizable. You should be able to make the links point to any page you want. For instance, we use one particular report all the time — a customized [reports:3]. So, "View Tickets" is useless to us (it should click to the custom report we want). Right now, we have placed a link to the report we like on the main wiki page, but we always have to navigate to that page just to click to the report we hit 1,000 times a day. Very inefficient. Better to allow people (wiki-style) to alter the nav or worst case give them a custom nav bar below that has dynamic links created by wiki-style entries.

comment:5 by Morgan, 19 years ago

I agree. We are a 40-person company asking for the same functionality. I would like to have a configuration area in the trac.ini file loking something like:

[mainnav]
<Showed name> <Link>
etc...

Only the items described in this area shall be visible in the mainnav(metanav) menu. e.g

[mainnav]
Wiki = wiki
Timeline = timeline
Roadmap = roadmap
New Tickets = wiki/my_local_wiki_page_with_different_new_ticket_links
etc...

Thank you (I really like this tool) /MF

comment:6 by anonymous, 19 years ago

Severity: trivialnormal

We completely agree with Morgan! We have a 20 person company and we have added in a bunch of plugins. Now the menu in mainnav is huge. We have tried removing things but they automatically come back in the end of the mainnav. We would like to alter what the mainnav's automatic behavior outputs. To exclude somethings or alter names. I have seen the trac plug for new tabs, but doesn't address existing tabs. I would increase this ticket from trivial to normal!

comment:7 by anonymous, 19 years ago

I found this…. http://trac-hacks.org/wiki/NavMoverPlugin

Perhaps this solve the situation?

comment:9 by Christian Boos, 18 years ago

Keywords: custom navigation added
Milestone: 0.11
Owner: changed from Jonas Borgström to Christian Boos
Priority: lownormal

#3808 was closed as a duplicate. That ticket requested to be able to specify the location of a redirect after a "logout". This could be achieved by using the following configuration:

[metanav]
# logout = enabled (this is the default)
logout.href = wiki/LogOut
logout.label = Log me out!

The ordering of the items will still be taken care of by the [trac] mainnav and [trac] metanav lists.

There are several other tickets that can be solved with a similar approach:

in reply to:  9 comment:10 by Christian Boos, 18 years ago

Resolution: fixed
Status: newclosed

Implemented in r5251.

A few corrections to, though:

  • #3808 can't be implemented this way, as we need to keep the /logout href for the logout mechanism to work at all, of course
  • this doesn't provide the possibility to add new items; you'd still have to use the TH:NavAddPlugin for that

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


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