Changes between Version 7 and Version 8 of TracInterfaceCustomization
- Timestamp:
- Jun 25, 2016, 8:15:23 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracInterfaceCustomization
v7 v8 94 94 {{{#!xml 95 95 <form py:match="div[@id='content' and @class='ticket']/form" py:attrs="select('@*')"> 96 <py:if test="req. environ['PATH_INFO']== '/newticket' and (not 'preview' in req.args)">96 <py:if test="req.path_info == '/newticket' and (not 'preview' in req.args)"> 97 97 <p>Please make sure to search for existing tickets before reporting a new one!</p> 98 98 </py:if> … … 101 101 }}} 102 102 103 This example illustrates a technique of using `req. environ['PATH_INFO']` to limit scope of changes to one view only. For instance, to make changes in `site.html` only for timeline and avoid modifying other sections - use `req.environ['PATH_INFO']== '/timeline'` condition in `<py:if>` test.103 This example illustrates a technique of using `req.path_info` to limit scope of changes to one view only. For instance, to make changes in `site.html` only for timeline and avoid modifying other sections - use `req.path_info == '/timeline'` condition in `<py:if>` test. 104 104 105 105 More examples snippets for `site.html` can be found at [trac:wiki:CookBook/SiteHtml CookBook/SiteHtml]. … … 111 111 <form py:match="div[@id='content' and @class='ticket']/form" py:attrs="select('@*')" 112 112 xmlns:xi="http://www.w3.org/2001/XInclude"> 113 <py:if test="req. environ['PATH_INFO']== '/newticket' and (not 'preview' in req.args)">113 <py:if test="req.path_info == '/newticket' and (not 'preview' in req.args)"> 114 114 <xi:include href="site_newticket.cs"><xi:fallback /></xi:include> 115 115 </py:if>