Changes between Version 7 and Version 8 of 1.1/TracInterfaceCustomization
- Timestamp:
- Mar 16, 2016, 10:28:40 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
1.1/TracInterfaceCustomization
v7 v8 89 89 {{{#!xml 90 90 <form py:match="div[@id='content' and @class='ticket']/form" py:attrs="select('@*')"> 91 <py:if test="req. environ['PATH_INFO']== '/newticket' and (not 'preview' in req.args)">91 <py:if test="req.path_info == '/newticket' and (not 'preview' in req.args)"> 92 92 <p>Please make sure to search for existing tickets before reporting a new one!</p> 93 93 </py:if> … … 96 96 }}} 97 97 98 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.98 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. 99 99 100 100 More examples snippets for `site.html` can be found at [trac:wiki:CookBook/SiteHtml CookBook/SiteHtml].