internal package
Foswiki::Templates %TMPL:P% | Instantiates a previously defined template |
%TMPL:DEF% | Opens a template definition |
%TMPL:END% | Closes a template definition |
%TMPL:INCLUDE% | Includes another file of templates |
ClassMethod
new ( $session ) ObjectMethod
finish() ObjectMethod
haveTemplate( $name ) → $boolean ObjectMethod
expandTemplate( $params ) → $string tmplP
.
Examples:
$tmpls->expandTemplate("blah"); $tmpls->expandTemplate(context="view" then="sigh" else="humph");
ObjectMethod
tmplP( $attrs ) → $string context
, then
and else
values.
Recursively expands any contained TMPL:P tags.
Note that it would be trivial to add template parameters to this,
simply by iterating over the other parameters (other than _DEFAULT, context,
then and else) and doing a s/// in the template for that parameter value. This
would add considerably to the power of templates.
ObjectMethod
readTemplate ( $name, %options ) → $text skin
- skin name,
web
- web to search
no_oops
- if true, will not throw an exception. Instead, returns undef.
![]() |
© 2025 D.Soost & D.Marxsen - All rights reserved © Of all articles by authors Trademarks are the property of their respective owners © Logo by Wikipedia, modified by Administrator | Impressum Disclaimer Datenschutzerklärung |