Skip to content
Permalink
Browse files

Clarified some poor documentation in tut_tempcode, re INCLUDE directi…

…ve and ^ escaper
  • Loading branch information...
chrisgraham committed Aug 12, 2019
1 parent 8b76b72 commit e6a5d2375eb75242841c7e7d34bc9da400df1a57
Showing with 2 additions and 2 deletions.
  1. +2 −2 docs/pages/comcode_custom/EN/tut_tempcode.txt
@@ -136,7 +136,7 @@ The following escaping filters are provided ([color="green"]green[/color] indica
</tr>
<tr style="background-color: #DDFFDD">
<td>[tt](^)[/tt]</td>
<td>Where new lines become [tt]\n[/tt] (multiple lines drawn together with \n as a separator).</td>
<td>Where new lines become [tt]\n[/tt] (individual lines are drawn together with \n as a separator).</td>
<td>[tt]a<br />b[/tt]</td>
<td>[tt]a\nb[/tt]</td>
</tr>
@@ -1730,7 +1730,7 @@ Note that you cannot use directives for symbol parameters because directives con
</tr>
<tr style="background: #DDFFDD">
<td>INCLUDE</td>
<td>Include a template in another and pass parameters (this makes a template very much like a function in a conventional programming language). Note that the automated smart-decaching (for developers manually editing template files) will not work on manually edited included templates because Composr's optimiser means that the actual template is "compiled into" the template that calls it and thus not regularly individually checked. If you try to include a template into itself, and don't give any new parameters, Composr will include the default version of that template in (if you do give parameters, or are running HipHop-PHP, you'll probably get a fatal error instead)</td>
<td>Include a template in another and pass parameters (this makes a template very much like a function in a conventional programming language). Important notes:<ol><li>the automated smart-decaching (for developers manually editing template files) will not work on manually edited included templates because Composr's optimiser means that the actual template is "compiled into" the template that calls it and thus not regularly individually checked.</li><li>The parameters are written inside the directive, in a very simple text syntax, <kbd>KEY=VALUE</kbd> (e.g. <kbd>FOO={BAR}</kbd>), where the actual parameter values are evaluated into text prior to the <kbd>INCLUDE</kbd> directive being evaluated. This has the result of anything after a linebreak being lost, unless you make use of the directives support for escaped line-breaks (e.g. <kbd>FOO={BAR^}</kbd>).</li></ol>If you try to include a template into itself, and don't give any new parameters, Composr will include the default version of that template in (if you do give parameters, or are running HipHop-PHP, you'll probably get a fatal error instead)</td>
</tr>
<tr style="background: #DDFFDD">
<td>WHILE</td>

0 comments on commit e6a5d23

Please sign in to comment.
You can’t perform that action at this time.