Template Macro
This is a Velocity macro, bundled with all the XWiki products by default.
Macro developed by the XWiki Development Team.
This macro cannot currently be downloaded separately.
Macro developed by the XWiki Development Team.
This macro cannot currently be downloaded separately.
Template Macro
This is the equivalent of the C preprocessor include directive : the result is a copy of the script passed as argument, into your script.Usage
#template($relativeURL)
Parameters definition
The path to the script you want to include. The path is relative to the directory of your skin. For example, if you are using the albatross skin, and have installed XWiki using the installer with default settings, the skin path will be :C:\Program Files\XWiki Enterprise\webapps\xwiki\skins\albatross
myscript.vm you want to include, and that script is located in a folder mydir inside the skin folder,
C:\Program Files\XWiki Enterprise\webapps\xwiki\skins\albatross\mydir\myscript.vm
#template("mydir/myscript.vm")Example
#template("comments.vm")Result
Comments on TemplateMacro
-
VincentMassol, 2007/11/14 21:04Jean-Vivien, what do you think of documenting the TemplateMacro here instead of in the "Include on Velocity" page and modify "Include on Velocity" to refernce the different macros in the code zone? It would be nice if all the macros could be documented in the Code Zone. Thanks!