Changes between Version 3 and Version 4 of TracInterfaceCustomization
- Timestamp:
- Mar 16, 2019, 5:26:46 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracInterfaceCustomization
v3 v4 34 34 }}} 35 35 36 Note though that this icon is ignored by Internet Explorer, which only accepts a file named ` `favicon.ico`` at the root of the host. To make the project icon work in both IE and other browsers, you can store the icon in the document root of the host, and reference it from ``trac.ini`` as follows:36 Note though that this icon is ignored by Internet Explorer, which only accepts a file named `favicon.ico` at the root of the host. To make the project icon work in both IE and other browsers, you can store the icon in the document root of the host, and reference it from `trac.ini` as follows: 37 37 38 38 {{{ … … 99 99 }}} 100 100 101 Those who are familiar with XSLT may notice that Genshi templates bear some similarities. However, there are some Trac specific features - for example `${href.chrome('site/style.css')}` attribute references a CSS file placed into environment's `htdocs/` directory. In a similar fashion `${chrome.htdocs_location}` is used to specify the common `htdocs/` directory belonging to a Trac installation. That latter location can however be overriden using the [[TracIni#trac- config|[trac] htdocs_location]] configuration setting.101 Those who are familiar with XSLT may notice that Genshi templates bear some similarities. However, there are some Trac specific features - for example `${href.chrome('site/style.css')}` attribute references a CSS file placed into environment's `htdocs/` directory. In a similar fashion `${chrome.htdocs_location}` is used to specify the common `htdocs/` directory belonging to a Trac installation. That latter location can however be overriden using the [[TracIni#trac-section|[trac] htdocs_location]] configuration setting. 102 102 103 103 `site.html` is one file to contain all your modifications. It usually works using the `py:match` directive (element or attribute), and it allows you to modify the page as it renders - the matches hook onto specific sections depending on what it tries to find … … 136 136 }}} 137 137 138 Also note that the `site.html` (despite its name) can be put in a commontemplates directory - see the [[TracIni#inherit-section|[inherit] templates_dir]] option. This could provide easier maintainence (and a migration path from 0.10 for larger installations) as one new global `site.html` file can be made to include any existing header, footer and newticket snippets.138 Also note that the `site.html` (despite its name) can be put in a shared templates directory - see the [[TracIni#inherit-section|[inherit] templates_dir]] option. This could provide easier maintainence (and a migration path from 0.10 for larger installations) as one new global `site.html` file can be made to include any existing header, footer and newticket snippets. 139 139 140 140 == Project List == #ProjectList … … 174 174 For [wiki:TracModWSGI mod_wsgi]: 175 175 {{{ 176 os.environ['TRAC_ENV_INDEX_TEMPLATE'] = '/path/to/template '176 os.environ['TRAC_ENV_INDEX_TEMPLATE'] = '/path/to/template.html' 177 177 }}} 178 178