Changes between Version 46 and Version 47 of TracInterfaceCustomization
- Timestamp:
- Jun 23, 2007, 11:41:15 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracInterfaceCustomization
v46 v47 117 117 Note that this references your environment's `htdocs/style.css`. 118 118 119 Example snippet of adding introduction text to the new ticket form :119 Example snippet of adding introduction text to the new ticket form (hide when preview): 120 120 121 121 {{{ 122 122 #!xml 123 <div py:match="div[@id='content' and @class='ticket']/form" py:attrs="select('@*')"> 123 <form py:match="div[@id='content' and @class='ticket']/form" py:attrs="select('@*')"> 124 <py:if test="req.environ['PATH_INFO'] == '/newticket' and (not 'preview' in req.args)"> 124 125 <p>Please make sure to search for existing tickets before reporting a new one!</p> 126 </py:if> 125 127 ${select('*')} 126 </ div>127 }}} 128 129 If the environment is upgraded from 0.10 and a `site_newticket.cs` file already exists, it can actually be loaded by using a workaroud - providing it contains no 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 , and below is a complete example `site.html` file for this:128 </form> 129 }}} 130 131 If the environment is upgraded from 0.10 and a `site_newticket.cs` file already exists, it can actually be loaded by using a workaroud - providing it contains no 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: 130 132 {{{ 131 133 #!xml 132 <html xmlns="http://www.w3.org/1999/xhtml" 133 xmlns:py="http://genshi.edgewall.org/" 134 xmlns:xi="http://www.w3.org/2001/XInclude" 135 py:strip=""> 136 137 <div py:match="div[@id='content' and @class='ticket']/form" py:attrs="select('@*')"> 134 <form py:match="div[@id='content' and @class='ticket']/form" py:attrs="select('@*')" 135 xmlns:xi="http://www.w3.org/2001/XInclude"> 136 <py:if test="req.environ['PATH_INFO'] == '/newticket' and (not 'preview' in req.args)"> 138 137 <xi:include href="site_newticket.cs"><xi:fallback /></xi:include> 138 </py:if> 139 139 ${select('*')} 140 </div> 141 142 </html> 140 </form> 143 141 }}} 144 142