, , , .
( .)
:
<#@ include file="debug.incl" #>`
some text1
<# if ( xdebug ) { #>
foo = bas;
<# } #>
more text
debug.incl :
<#
bool xdebug = true;
#>
(if) xdebug, xdebug debug.incl.
, debug.incl, . , , , - ...
(I tried debug.tt instead of debug.incl to no avail, switched to .incl, so debug.cs was not created by debug.tt.)
This does not work very well as it does not display compilation conditional characters, although it actually includes the debug attribute of the template!
<#
#if DEBUG
bool xdebug = true;
#else
bool xdebug = false;
#endif
#>
some text1
<# if ( xdebug ) { #>
foo = bas;
<# } #>
more text
with <#@ template debug="true" #>vs. <# template debug=false #>you get a conditional conclusion or not, respectively.
source
share