| 118 | |
| 119 | Example snippet of adding introduction text to the new ticket form: |
| 120 | |
| 121 | {{{ |
| 122 | #!xml |
| 123 | <div py:match="div[@id='content' and @class='ticket']/form" py:attrs="select('@*')"> |
| 124 | <p>Please make sure to search for existing tickets before reporting a new one!</p> |
| 125 | ${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. The XInclude namespace must be included, so below is a complete example `site.html` file for this: |
| 130 | {{{ |
| 131 | #!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('@*')"> |
| 138 | <xi:include href="site_newticket.cs"><xi:fallback /></xi:include> |
| 139 | ${select('*')} |
| 140 | </div> |
| 141 | |
| 142 | </html> |
| 143 | }}} |
| 144 | |
| 145 | Also not that the `site.html` (despite its name) also can be put in a common templates directory - see the `[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. |