Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://kodomo.cmm.msu.su/trac/tanchiki/wiki/TracNavigation?action=diff&version=2
Äàòà èçìåíåíèÿ: Unknown
Äàòà èíäåêñèðîâàíèÿ: Mon Apr 11 04:43:09 2016
Êîäèðîâêà: IBM-866
TracNavigation (diff) òÀÓ Tanchiki

Changes between Version 1 and Version 2 of TracNavigation


Ignore:
Timestamp:
08/21/13 19:46:14 (3 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracNavigation

    v1 v2 ˆà
    33Starting with Trac 0.11, it is now possible to customize the main and meta navigation entries in some basic ways.ˆà
    44ˆà
    5ˆà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.ˆà
    ˆà5The 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.  The `mainnav` and `metanav` options in the `[trac]` configuration section can also be used to change the order.ˆà
    66ˆà
    7ˆà`[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.ˆà
    ˆà7=== `[mainnav]` #mainnav-barˆà
    ˆà8`[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 that are accessible for the current user.ˆà
    89ˆà
    9ˆà`[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.ˆà
    1010ˆà
    11ˆàNote that it is still not possible to customize the '''contextual navigation bar''', i.e. the one usually placed below the main navigation bar.ˆà
    ˆà11** [=#Example Example] ** ˆà
    1212ˆà
    13ˆà=== Example ===ˆà
    14ˆàˆà
    15ˆàIn the following example, we rename the link to the Wiki start "Home", and hide the "Help/Guide" link. ˆà
    16ˆàWe also make the "View Tickets" entry link to a specific report.ˆà
    ˆà13In the following example, we rename the link to the Wiki start "Home", and make the "View Tickets" entry link to a specific report.  The second example (below) also hides the "!Help/Guide" link.ˆà
    1714ˆà
    1815Relevant excerpt from the TracIni:ˆà
    òÀæ òÀæ ˆà
    2118wiki.label = Homeˆà
    2219tickets.href = /report/24ˆà
    ˆà20}}}ˆà
    2321ˆà
    ˆà22=== `[metanav]` #metanav-barˆà
    ˆà23`[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.ˆà
    ˆà24ˆà
    ˆà25There is one special entry in the  `[metanav]` section: `logout.redirect` is the page the user sees after hitting the logout button. ˆà
    ˆà26[[comment(see also #Trac3808)]]ˆà
    ˆà27ˆà
    ˆà28** Example ** ˆà
    ˆà29ˆà
    ˆà30{{{ˆà
    2431[metanav]ˆà
    2532help = disabledˆà
    ˆà33logout.redirect = wiki/Logoutˆà
    2634}}}ˆà
    ˆà35ˆà
    ˆà36ˆà
    ˆà37=== Notesˆà
    ˆà38Possible URL formats (for `.href` or `.redirect`):ˆà
    ˆà39|| '''config''' || '''redirect to''' ||ˆà
    ˆà40|| `wiki/Logout` || `/projects/env/wiki/Logout` ||ˆà
    ˆà41|| `http://hostname/` || `http://hostname/` ||ˆà
    ˆà42|| `/projects` || `/projects` ||ˆà
    ˆà43ˆà
    ˆà44ˆà
    ˆà45=== `[trac]` #nav-orderˆà
    ˆà46The `mainnav` and `metanav` options in the `[trac]` configuration section control the order in which the navigation items are displayed (left to right).  This can be useful with plugins that add navigation items.ˆà
    ˆà47ˆà
    ˆà48** Example ** ˆà
    ˆà49ˆà
    ˆà50In the following example, we change the order to prioritise the ticket related items further left.ˆà
    ˆà51ˆà
    ˆà52Relevant excerpt from the TracIni:ˆà
    ˆà53{{{ˆà
    ˆà54[trac]ˆà
    ˆà55mainnav = wiki,tickets,newticket,timeline,roadmap,browser,search,adminˆà
    ˆà56}}}ˆà
    ˆà57ˆà
    ˆà58The default order and item names can be found in the source, which at the time of writing [source:trunk/trac/web/chrome.py@10883:397,402-403#L396 is here]ˆà
    ˆà59ˆà
    ˆà60=== Context Navigation #ctxtnav-barˆà
    ˆà61ˆà
    ˆà62Note that it is still not possible to customize the '''contextual navigation bar''', i.e. the one usually placed below the main navigation bar.ˆà
    ˆà63ˆà
    2764ˆà
    2865----ˆà