Edgewall Software

Changes between Version 4 and Version 5 of 1.1/TracInterfaceCustomization


Ignore:
Timestamp:
May 13, 2015, 8:28:11 PM (9 years ago)
Author:
Jun Omae
Comment:

Merged TracInterfaceCustomization@85

Legend:

Unmodified
Added
Removed
Modified
  • 1.1/TracInterfaceCustomization

    v4 v5  
    5353Trac is using [http://genshi.edgewall.org Genshi] as the templating engine. Say you want to add a link to a custom stylesheet, and then your own header and footer. Save the following content as `site.html` inside your projects `templates/` directory (each Trac project can have their own `site.html`), eg `/path/to/env/templates/site.html`:
    5454
    55 {{{
    56 #!xml
     55{{{#!xml
    5756<html xmlns="http://www.w3.org/1999/xhtml"
    5857      xmlns:py="http://genshi.edgewall.org/"
     
    112111The following is the basic template used by Trac to display a list of links to the projects. For projects that could not be loaded, it displays an error message. You can use this as a starting point for your own index template:
    113112
    114 {{{
    115 #!text/html
     113{{{#!text/html
    116114<!DOCTYPE html
    117115    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     
    141139
    142140For [wiki:TracModWSGI mod_wsgi]:
    143 {{{
     141{{{#!python
    144142os.environ['TRAC_ENV_INDEX_TEMPLATE'] = '/path/to/template.html'
    145143}}}
    146144
    147145For [wiki:TracFastCgi FastCGI]:
    148 {{{
     146{{{#!apache
    149147FastCgiConfig -initial-env TRAC_ENV_PARENT_DIR=/parent/dir/of/projects \
    150148              -initial-env TRAC_ENV_INDEX_TEMPLATE=/path/to/template
     
    152150
    153151For [wiki:TracModPython mod_python]:
    154 {{{
     152{{{#!apache
    155153PythonOption TracEnvParentDir /parent/dir/of/projects
    156154PythonOption TracEnvIndexTemplate /path/to/template
     
    158156
    159157For [wiki:TracCgi CGI]:
    160 {{{
     158{{{#!apache
    161159SetEnv TRAC_ENV_INDEX_TEMPLATE /path/to/template
    162160}}}
     
    164162For [wiki:TracStandalone], you'll need to set up the `TRAC_ENV_INDEX_TEMPLATE` environment variable in the shell used to launch tracd:
    165163 - Unix
    166    {{{
    167 #!sh
     164   {{{#!sh
    168165$ export TRAC_ENV_INDEX_TEMPLATE=/path/to/template
    169166   }}}
    170167 - Windows
    171    {{{
    172 #!sh
     168   {{{#!sh
    173169$ set TRAC_ENV_INDEX_TEMPLATE=/path/to/template
    174170   }}}