Changes between Version 4 and Version 5 of 1.1/TracInterfaceCustomization
- Timestamp:
- May 13, 2015, 8:28:11 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
1.1/TracInterfaceCustomization
v4 v5 53 53 Trac 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`: 54 54 55 {{{ 56 #!xml 55 {{{#!xml 57 56 <html xmlns="http://www.w3.org/1999/xhtml" 58 57 xmlns:py="http://genshi.edgewall.org/" … … 112 111 The 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: 113 112 114 {{{ 115 #!text/html 113 {{{#!text/html 116 114 <!DOCTYPE html 117 115 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" … … 141 139 142 140 For [wiki:TracModWSGI mod_wsgi]: 143 {{{ 141 {{{#!python 144 142 os.environ['TRAC_ENV_INDEX_TEMPLATE'] = '/path/to/template.html' 145 143 }}} 146 144 147 145 For [wiki:TracFastCgi FastCGI]: 148 {{{ 146 {{{#!apache 149 147 FastCgiConfig -initial-env TRAC_ENV_PARENT_DIR=/parent/dir/of/projects \ 150 148 -initial-env TRAC_ENV_INDEX_TEMPLATE=/path/to/template … … 152 150 153 151 For [wiki:TracModPython mod_python]: 154 {{{ 152 {{{#!apache 155 153 PythonOption TracEnvParentDir /parent/dir/of/projects 156 154 PythonOption TracEnvIndexTemplate /path/to/template … … 158 156 159 157 For [wiki:TracCgi CGI]: 160 {{{ 158 {{{#!apache 161 159 SetEnv TRAC_ENV_INDEX_TEMPLATE /path/to/template 162 160 }}} … … 164 162 For [wiki:TracStandalone], you'll need to set up the `TRAC_ENV_INDEX_TEMPLATE` environment variable in the shell used to launch tracd: 165 163 - Unix 166 {{{ 167 #!sh 164 {{{#!sh 168 165 $ export TRAC_ENV_INDEX_TEMPLATE=/path/to/template 169 166 }}} 170 167 - Windows 171 {{{ 172 #!sh 168 {{{#!sh 173 169 $ set TRAC_ENV_INDEX_TEMPLATE=/path/to/template 174 170 }}}