TracNavigation
Version 2 (Anonymous, 03/15/2008 04:41 PM)
1 | 1 | ||
---|---|---|---|
2 | 2 | h1. Trac Navigation |
|
3 | 2 | ||
4 | 2 | ||
5 | 1 | Starting with Trac 0.11, it is now possible to customize the main and meta navigation entries in some basic ways. |
|
6 | 1 | ||
7 | 2 | The new @[mainnav]@ and @[metanav]@ configuration sections can now be used to customize the text and link used for the navigation items, or even to disable them. |
|
8 | 1 | ||
9 | 2 | @[mainnav]@ corresponds to the *main navigation bar*, the one containing entries such as _Wiki_, _Timeline_, _Roadmap_, _Browse Source_ and so on. This navigation bar is meant to access the default page of the main modules enabled in Trac and accessible for the current user. |
|
10 | 1 | ||
11 | 2 | @[metanav]@ corresponds to the *meta navigation bar*, by default positioned above the main navigation bar and below the _Search_ box. It contains the _Log in_, _Logout_, _Help/Guide_ etc. entries. This navigation bar is meant to access some global information about the Trac project and the current user. |
|
12 | 1 | ||
13 | 2 | Note that it is still not possible to customize the *contextual navigation bar*, i.e. the one usually placed below the main navigation bar. |
|
14 | 1 | ||
15 | 1 | ||
16 | 2 | h3. Example |
|
17 | 2 | ||
18 | 2 | ||
19 | 1 | In the following example, we rename the link to the Wiki start "Home", and hide the "Help/Guide" link. |
|
20 | 1 | We also make the "View Tickets" entry link to a specific report. |
|
21 | 1 | ||
22 | 2 | Relevant excerpt from the [[TracIni]]: |
|
23 | 2 | <pre> |
|
24 | 1 | [mainnav] |
|
25 | 1 | wiki.label = Home |
|
26 | 1 | tickets.href = /report/24 |
|
27 | 1 | ||
28 | 1 | [metanav] |
|
29 | 1 | help = disabled |
|
30 | 2 | </pre> |
|
31 | 1 | ||
32 | 1 | ---- |
|
33 | 2 | See also: [[TracInterfaceCustomization]], the [[TracHacks]]:NavAddPlugin (still needed for adding entries) |