Progetto

Generale

Profilo

TracNavigation » Cronologia » Versione 2

Anonimo, 10-11-2008 15:31

1 1
2 2
h1. Trac Navigation
3
4
5 1
Starting with Trac 0.11, it is now possible to customize the main and meta navigation entries in some basic ways.
6
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
16 2
h3. Example
17
18
19 1
In the following example, we rename the link to the Wiki start "Home", and hide the "Help/Guide" link. 
20
We also make the "View Tickets" entry link to a specific report.
21
22 2
Relevant excerpt from the [[TracIni]]:
23
<pre>
24 1
[mainnav]
25
wiki.label = Home
26
tickets.href = /report/24
27
28
[metanav]
29
help = disabled
30 2
</pre>
31 1
32
----
33 2
See also: [[TracInterfaceCustomization]], the [[TracHacks]]:NavAddPlugin (still needed for adding entries)