Greetings, I'm setting up a Trac 0.11 server for my organization. It will be hosting a number of projects and I, for one, don't like the idea of mirroring Trac documentation on each of them. It interferes with the search function, and clutters the index page.
I've setup a separate 'Trac Documentation' project, which will be left unmodified from the default installation. The 'Help/Guide' link on all other projects has been changed via the [metanav] help.href configuration option, but now I have a problem in dealing with all the other links (like WikiFormatting on the wiki edit page). My current solution is to add a RedirectMatch rule to the apache configuration. Here's the exact rule that I use: "RedirectMatch (?<!^/doc)/wiki/((?:Trac|Wiki)[A-Za-z]+)$ /doc/wiki/$1" This does work, any url in the form <trac site>/wiki/<documentation page> is redirected to /doc/wiki/<documentation page>. However, since I delete all of the built-in documentation from the database, non-hardcoded links show up with a '?' after them as though that page does not exist (which is the case). Clicking on them works, but ideally I want to maintain original appearance. What I need then is a way to rewrite the documentation urls via Genshi site.html template. This is where my knowledge is lacking a bit. I've spent a few hours trying to come up with a rule that works, but so far no luck. Can this be done in an elegant way (i.e. a regular expression match and replace on the href attribute similar to my RedirectMatch rule)? The 'class="missing wiki"' also needs to be removed if it is present, and so does the '?' at the end of the page name. If you have an idea on how to do this, please let me know. - Max P.S. I know that the WikiFormatting example that I use can be fixed by editing the wiki_edit.html template file. However, I want a more general solution that works for any link anywhere on the site that begins with 'Trac' or 'Wiki'. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
