Edgewall Software

Changes between Version 7 and Version 8 of 1.1/TracInterfaceCustomization


Ignore:
Timestamp:
Mar 16, 2016, 10:28:40 AM (8 years ago)
Author:
Ryan J Ollos
Comment:

Mege TracInterfaceCustomization@89.

Legend:

Unmodified
Added
Removed
Modified
  • 1.1/TracInterfaceCustomization

    v7 v8  
    8989{{{#!xml
    9090<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)">
    9292    <p>Please make sure to search for existing tickets before reporting a new one!</p>
    9393  </py:if>
     
    9696}}}
    9797
    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.
     98This 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.
    9999
    100100More examples snippets for `site.html` can be found at [trac:wiki:CookBook/SiteHtml CookBook/SiteHtml].