Wiki source code of XWiki HowTo’s
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | = XWiki HowTo's = | ||
2 | |||
3 | {{toc start="2" numbered="true" depth="3"/}} | ||
4 | |||
5 | == Links == | ||
6 | |||
7 | * [[Changing the skin >>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Skins]] | ||
8 | * [[Advanced (Developer) guide >>http://platform.xwiki.org/xwiki/bin/view/DevGuide/]] | ||
9 | * [[Developer guide >>http://dev.xwiki.org/xwiki/bin/view/Main/]] | ||
10 | * [[Code Zone >>http://code.xwiki.org/xwiki/bin/view/Main/]] | ||
11 | * [[wiki using API >>http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki%2Dcore%2D2.0%2Drc%2D1%2Djavadoc.jar/index.html]] | ||
12 | |||
13 | == Macros == | ||
14 | |||
15 | === Create Velocity Macro === | ||
16 | |||
17 | {{warning}}A write access to your XWiki installation directory is required!{{/warning}} | ||
18 | |||
19 | 1. Add a new macro to the file "macros.vm" | ||
20 | 1*. see "<xwiki-installation-root>/xwiki/templates" | ||
21 | 1*. add at the end of the file your new macro, for example: | ||
22 | {{code}}#macro(myMacroName) | ||
23 | Hello World! | ||
24 | #end{{/code}} | ||
25 | 1. Register the new macro in the file "macros.txt" | ||
26 | 1*. see "<xwiki-installation-root>/xwiki/templates" | ||
27 | 1*. add at the end of the file the line, for example: | ||
28 | {{code}}myMacroName=velocity:myMacroName:{{/code}} | ||
29 | 1. After XWiki restart the new velocity macro can be used in a common way: either using the WYSIWYG editor or [[text mode>>http://code.xwiki.org/xwiki/bin/view/Macros/]]. |