#include now works. #parse is coming tomorrow (or so). A brief summary
:
The syntax is
#include( arg1 [arg2 arg3 ...] )
where
argn = string literal or reference
yes, it requres the () and yes, it takes multiple args if you wish.
Also
#include( arg1 arg2 )
is equivalent to
#include( arg1 )
#include( arg2 )
What else ...
1) The included files *must* come from the template.path tree for
security reasons [#include(/etc/passwd) is uncool :) ] So if you have
content that lives outside of the template tree, link it in. We should
probably add a staticcontent.path property for this to allow the static
content to be separated from the templates.
2) The included filename must not have a .. in it (see #1).
3) If something other than a reference or stringlit is used as an arg,
an error will be logged and processing will continue.
4) If an incorrect filename is given (FileNotFound...) then an error
will be logged and processing will continue.
5) If there is an error, default behavior is silent in render output.
You can change this to make debugging easy for uses with two properties.
Both must be there to work:
include.output.errormsg.start = <!-- include error :
include.output.errormsg.end = see error log -->
You should see from above why two : so for HTML, you use above. For
Java, maybe /* and */. A vaguely helpful error will be placed between
errormsg.start and errormsg.end and written to the output. The point is
to see that something happened in the stream, to prompt you to look at
better error messages in the log.
geir
--
Geir Magnusson Jr. [EMAIL PROTECTED]
Dakota tribal wisdom: "when you discover you are riding a dead horse,
the best strategy is to dismount."