From 0ba52c65f09f28d1c70af5eaf01b8200d7e83063 Mon Sep 17 00:00:00 2001 From: mohrt Date: Tue, 24 Apr 2001 16:58:08 +0000 Subject: [PATCH] update compiler function docs --- docs.sgml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/docs.sgml b/docs.sgml index 9a32646e..e14e3ac2 100644 --- a/docs.sgml +++ b/docs.sgml @@ -833,6 +833,59 @@ $smarty->register_filter("remove_dw_comments"); $smarty->unregister_filter("imbed_asp_jokes"); + + + + + register_compiler_function + + + void register_compiler_function + string funcname + string funcimpl + + + + Use this to dynamically register template functions that are + executed only at compile time of the template. This useful for + injecting PHP code or time-sensitive static content into the + template. + + +register_compiler_function + + +// PHP code + +$smarty->register_compiler_function("tplheader","smarty_template_header"); + +function smarty_template_header() { + +} + +{* this function gets executed at compile time only *} +{tplheader} + + + + + + unregister_compiler_function + + + void unregister_compiler_function + string funcname + + + + Use this to dynamically unregister a compiler function. + + +unregister_compiler_function + + +$smarty->unregister_compiler_function("tplheader"); +