12

A default Trac installation will display the WikiStart page as its home page. I'd like it to display another page. How do I do that? I was unable to find anything with Google, as any request with "Trac" in it will return links to every opensource project that uses Trac.

lindelof
  • 34,556
  • 31
  • 99
  • 140

6 Answers6

6

If you want to keep the "Welcome to Trac" page, have you considered simply migrating that content to a new page and then editing WikiStart? Trac documentation upgrades leave the WikiStart page unchanged (as documented here), so you aren't making trouble for yourself in that regard.

Richard Dunlap
  • 1,957
  • 11
  • 18
5

Are you wanting to display a different wiki page, or a different kind of page? I don't know of a config option for the former, but you can use [trac] default_handler in your trac.ini to make, say, the custom query page be the default page.

Edit: Taking a quick glance over the sources, WikiStart is pretty well hard-coded as the start page for the wiki. So, short of patching Trac, I don't think you can do what you're after.

retracile
  • 12,167
  • 4
  • 35
  • 42
  • A different wiki page. By default, Trac shows the "Welcome to Trac" page. I'd like to keep that page but have another one as the default landing page. – lindelof Aug 18 '09 at 06:19
  • If you use the default_handler from trac.ini You could create a simple plugin overloading your WikiModule Class, and then return a different page than WikiStart. But this would involve a little Python hacking. – parceval Aug 26 '09 at 16:08
5

It seems there's no hope in overriding /wiki URL path to render a wiki page other than WikiStart. That's hardcoded by design (maybe for a very good reason).

On the other hand you can use configuration options in [mainnav] section to override Wiki link in main navigation area and make it point at a custom wiki page e.g.

[mainnav]
wiki.label = Home
wiki.href = /wiki/HomePage

see details in trac:wiki:TracInterfaceCustomization#CustomNavigationEntries

Olemis Lang
  • 738
  • 7
  • 17
0

If your Trac installation is behind Apache, then you can use an Apache configuration directive to redirect or rename the "home page" url. For example, look at the "Alias" directive.

Glenn
  • 6,455
  • 4
  • 33
  • 42
  • Yes I am behind Apache, but is there really no way I can configure Trac itself to show a certain page when requesting /projectname/wiki? – lindelof Aug 18 '09 at 06:18
0

My solution to the same problem was to use the [[Include]] macro (http://trac-hacks.org/wiki/IncludeMacro), and have the WikiStart page contain a single include statement.

I wanted a different page name than WikiStart so I could use the page name prefixes to categorize sets of pages, e.g., MyToolNameIntroduction is my start page.

mgs
  • 86
  • 5
0

This trac ticket suggests it is not directly possible: http://trac.edgewall.org/ticket/9012

skyebend
  • 1,079
  • 6
  • 19