#2060 closed enhancement (fixed)
alter entries in metanav and mainnav?
Reported by: | 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 , 19 years ago
Priority: | normal → low |
---|---|
Severity: | normal → trivial |
comment:2 by , 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 , 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 , 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 , 18 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 , 18 years ago
Severity: | trivial → normal |
---|
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 , 18 years ago
I found this…. http://trac-hacks.org/wiki/NavMoverPlugin
Perhaps this solve the situation?
follow-up: 10 comment:9 by , 18 years ago
Keywords: | custom navigation added |
---|---|
Milestone: | → 0.11 |
Owner: | changed from | to
Priority: | low → normal |
#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:
- #1925 (see also "Discussing two changesets" on trac-dev)
- #4191
- will be able to replace TH:NavAddPlugin and TH:NavHiderPlugin
comment:10 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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
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 thetrac.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 (seeget_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.