Mercurial > p > roundup > code
diff doc/customizing.txt @ 5154:f608eeecf638
issue2550891: Allow subdir in template value. Anthony (antmail)
requested the ability to put templates into subdirectories. So
the issue class can accept @template=issues/item to get the
html/issues/issue.item.html template.
Inlcude a test case for missing and existing (tal) templates.
Also include a test that fails path traversal check.
Add mention of subdiectoy use to customizing.txt along with some
spelling fixes and ^M removal.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Fri, 22 Jul 2016 15:19:40 -0400 |
| parents | 9e8d8cd49f40 |
| children | 882fa4d9bead |
line wrap: on
line diff
--- a/doc/customizing.txt Wed Jul 20 22:30:35 2016 -0400 +++ b/doc/customizing.txt Fri Jul 22 15:19:40 2016 -0400 @@ -94,7 +94,7 @@ templates -- ``html`` Path to the HTML templates directory. The path may be either absolute - or relative to the directory containig this config file. + or relative to the directory containing this config file. static_files -- default *blank* Path to directory holding additional static files available via Web @@ -1480,11 +1480,11 @@ with (i.e. "file1/kitten.png" is nicer to download than "file1"). This raises a ``SendFile`` exception. -Neither b. or e. use templates and stop before the template is -determined. For other contexts the template used is specified by the +Neither b. or e. use templates and stop before the template is +determined. For other contexts the template used is specified by the ``@template`` variable, which defaults to: -- only classname suplied: "index" +- only classname supplied: "index" - full item designator supplied: "item" @@ -1798,6 +1798,15 @@ and it won't affect your users using the "issue.item" template. +You can also put templates into a subdirectory of the template +directory. So if you specify:: + + http://your.tracker.example/tracker/issue?@template=test/item + +you will use the template at: ``test/issue.item.html``. If that +template doesn't exit it will try to use +``test/_generic.item.html``. If that template doesn't exist +it will return an error. How the templates work ----------------------
