Edgewall Software
Modify

Opened 12 years ago

Closed 7 years ago

#10595 closed enhancement (duplicate)

[PATCH] Allow custom index page

Reported by: alexandrul.ct@… Owned by:
Priority: high Milestone:
Component: wiki system Version: 0.12-stable
Severity: minor Keywords: wiki help patch review
Cc: Ryan J Ollos Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Currently the index page is hard-coded to 'TitleIndex'. The attached patch allows the customization of the page used as the index.

Attachments (4)

index_page.patch (1.5 KB ) - added by alexandrul.ct@… 12 years ago.
wiki: allow custom index page
start_page.patch (1.6 KB ) - added by alexandrul.ct@… 12 years ago.
wiki: allow custom start page
help_page.patch (1.2 KB ) - added by alexandrul.ct@… 12 years ago.
wiki: allow custom help page
guide_href.patch (2.6 KB ) - added by Eduard <alexandrul.ct@…> 12 years ago.
wiki: optional guide link, uses intertrac syntax

Download all attachments as: .zip

Change History (21)

by alexandrul.ct@…, 12 years ago

Attachment: index_page.patch added

wiki: allow custom index page

comment:1 by framay <franz.mayer@…>, 12 years ago

See also #10543 and NavigationDisplayPlugin, which provides a user preference for the mainnav entry "Wiki". Maybe the plugin or approach is also useful for you?

comment:2 by alexandrul.ct@…, 12 years ago

It is interesting, but not enough. Start page and Index are hard-coded inside web_ui.py and I need them to be customizable.

As a side-note, I want the wiki to be as clean as possible, so I moved the administrative pages under the Wiki namespace, with /Wiki set as start page and /Wiki/TitleIndex and /Wiki/RecentChanges used for index. As a bonus, from TitleIndex I can choose the Up link and arrive at the start page.

Of course, all the initial content of the wiki would be made available to the end-users in a separate environment, which will be recreated after every Trac update.

by alexandrul.ct@…, 12 years ago

Attachment: start_page.patch added

wiki: allow custom start page

by alexandrul.ct@…, 12 years ago

Attachment: help_page.patch added

wiki: allow custom help page

comment:3 by alexandrul.ct@…, 12 years ago

I have attached the last patch that allows a custom help page, so at this moment web_ui.py contains no hardcoded page names.

For the future I would split the Help/Guide link in two: the Help page could have only info about the current environment, and the Guide could link to another clean/read-only Trac environment (or even http://trac.edgewall.org) where the users can learn about Trac.

comment:4 by Eduard <alexandrul.ct@…>, 12 years ago

All 3 patches (applied on 0.12-stable) can be pulled from here: https://bitbucket.org/alexandrul/trac

by Eduard <alexandrul.ct@…>, 12 years ago

Attachment: guide_href.patch added

wiki: optional guide link, uses intertrac syntax

comment:5 by Eduard <alexandrul.ct@…>, 12 years ago

The Help/Guide link would be splitted into Help and Trac Guide if the option guide_href is non-empty.

I'm not quite sure about the intertrac way, I could use a guide_page option as for the rest of the patches, and if the link needs to point to an external url, just redefine it in [metanav] section. Your feedback is welcome.

comment:6 by alexandrul.ct@…, 12 years ago

Keywords: patch review added

comment:7 by Christian Boos, 12 years ago

Keywords: help added
Milestone: 0.12.4next-dev-1.1.x

Not for 0.12-stable, but worth a 2nd look after 1.0.

comment:8 by Ryan J Ollos <ryano@…>, 12 years ago

Cc: ryano@… added

comment:10 by Ryan J Ollos, 10 years ago

Cc: Ryan J Ollos added; ryano@… removed

comment:11 by Peter Suter, 10 years ago

May be considered a duplicate of #4422.

in reply to:  5 ; comment:12 by Ryan J Ollos, 9 years ago

Replying to Eduard <alexandrul.ct@…>:

The Help/Guide link would be splitted into Help and Trac Guide if the option guide_href is non-empty.

The enhancements in this ticket look useful to varying degrees, but we have to be concerned about option bloat (as noted in #4422). I don't see the reason for separating Help and Trac Guide. Could you explain that one a bit more? Isn't the Trac Guide just the index for the help pages? I could even see renaming Help/Guide to Help.

I'm not quite sure about the intertrac way, I could use a guide_page option as for the rest of the patches, and if the link needs to point to an external url, just redefine it in [metanav] section. Your feedback is welcome.

Having the option to link to external help documentation seems useful. The linked documentation could be on t.e.o, or for a single Trac project in a multiple project / multiple environment setup, so that all users are seeing and editing the same wiki documentation (as you noted in comment:3).

Users would probably like the option to use an external URL, as well as relative URLs, wiki page names and perhaps InterTrac link syntax.

Last edited 9 years ago by Ryan J Ollos (previous) (diff)

in reply to:  12 ; comment:13 by Ryan J Ollos, 9 years ago

Replying to rjollos:

Having the option to link to external help documentation seems useful. The linked documentation could be on t.e.o, or for a single Trac project in a multiple project / multiple environment setup, so that all users are seeing and editing the same wiki documentation.

I should have realized, this is already possible. The Help/Guide link can be customized through the [metanav] section of trac.ini. See TracNavigation for more details.

[metanav]
help.href = //trac.edgewall.org/wiki/TracGuide

You can even change the label:

[metanav]
help.label = Help

#11317 proposes to allow the addition of new items, obsoleting the th:NavAddPlugin. Once that is implemented you'd be able to add a second link to support splitting Help/Guide into two links.

Last edited 9 years ago by Ryan J Ollos (previous) (diff)

comment:14 by Ryan J Ollos, 9 years ago

Expanding on comment:13, a more generic approach of handling the scenarios you describe would allow customizing the contextual navigation items through a [contextnav] section (TracNavigation#ctxtnav-bar), complementing the [mainnav] and [metanav] sections. This looks like it could be more challenging to implement than the customization of the [metanav] and [mainnav] sections.

Last edited 9 years ago by Ryan J Ollos (previous) (diff)

in reply to:  12 comment:15 by Eduard <alexandrul.ct@…>, 9 years ago

Replying to rjollos:

Replying to Eduard <alexandrul.ct@…>:

The Help/Guide link would be splitted into Help and Trac Guide if the option guide_href is non-empty.

The enhancements in this ticket look useful to varying degrees, but we have to be concerned about option bloat (as noted in #4422). I don't see the reason for separating Help and Trac Guide. Could you explain that one a bit more? Isn't the Trac Guide just the index for the help pages? I could even see renaming Help/Guide to Help.

Trac Guide would be a link to a separate project, intended as a Trac reference.

Help would be specific to each project: more details about the project (to help new joiners), contact persons, links to dedicated pages like guidelines for raising issues, and so on.

comment:16 by Ryan J Ollos, 9 years ago

Milestone: next-dev-1.1.xnext-major-releases

Retargetting tickets to narrow focus for milestone:1.2. Please move the ticket back to milestone:next-dev-1.1.x if you intend to resolve it by milestone:1.2.

in reply to:  13 comment:18 by Ryan J Ollos, 7 years ago

Milestone: next-major-releases
Resolution: duplicate
Status: newclosed

Replying to Ryan J Ollos:

#11317 proposes to allow the addition of new items, obsoleting the th:NavAddPlugin. Once that is implemented you'd be able to add a second link to support splitting Help/Guide into two links.

This has been implemented, so the request for splitting Help/Guide is possible in Trac 1.3.2 and later.

Closing as duplicate of #9487.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) 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.