120 | | If the environment is upgraded from 0.10 and a `site_newticket.cs` file already exists, it can be loaded using a workaround - 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: |
121 | | {{{ |
122 | | #!xml |
123 | | <form py:match="div[@id='content' and @class='ticket']/form" py:attrs="select('@*')" |
124 | | xmlns:xi="http://www.w3.org/2001/XInclude"> |
125 | | <py:if test="req.environ['PATH_INFO'] == '/newticket' and (not 'preview' in req.args)"> |
126 | | <xi:include href="site_newticket.cs"><xi:fallback /></xi:include> |
127 | | </py:if> |
128 | | ${select('*')} |
129 | | </form> |
130 | | }}} |
131 | | |
132 | | Also note that the `site.html`, despite its name, can be put in a shared templates directory, see the [[TracIni#inherit-section|[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. |
| 120 | Note that the `site.html`, despite its name, can be put in a shared templates directory, see the [[TracIni#inherit-section|[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. |