Edgewall Software

Changes between Version 1 and Version 2 of 1.1/TracInterfaceCustomization


Ignore:
Timestamp:
Jan 15, 2015, 8:19:41 PM (9 years ago)
Author:
Ryan J Ollos
Comment:

Drop discussion of ClearSilver templates from Trac < 0.10. It is highly unlikely users will be upgrading from 0.10.x to 1.2.x or later.

Legend:

Unmodified
Added
Removed
Modified
  • 1.1/TracInterfaceCustomization

    v1 v2  
    118118Example snippets for `style.css` can be found at [trac:wiki:CookBook/SiteStyleCss CookBook/SiteStyleCss].
    119119
    120 If the environment is upgraded from 0.10 and a `site_newticket.cs` file already exists, it can be loaded using a workaround - providing it contains no [trac:ClearSilver] processing. In addition, as only one element can be imported, the content needs some sort of wrapper such as a `<div>` block or other similar parent container. The XInclude namespace must be specified to allow includes, but that can be moved to document root along with the others:
    121 {{{
    122 #!xml
    123 <form py:match="div[@id='content' and @class='ticket']/form" py:attrs="select('@*')"
    124         xmlns:xi="http://www.w3.org/2001/XInclude">
    125   <py:if test="req.environ['PATH_INFO'] == '/newticket' and (not 'preview' in req.args)">
    126     <xi:include href="site_newticket.cs"><xi:fallback /></xi:include>
    127   </py:if>
    128   ${select('*')}
    129 </form>
    130 }}}
    131 
    132 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.
     120Note 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.
    133121
    134122== Project List == #ProjectList