|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Macros can be used to extend the template files syntax. Macros must be registered at the TemplateContext you are using. Whenever a macro with given name is found the process method is called. Macros also allow you to use parameters that are set at individual template classes.
TemplateContext.registerMacro(ee.mare.indrek.jtlt.TemplateMacro)
Method Summary | |
String |
getName()
Get the name of the macro. |
boolean |
isParsetime()
Returns whether a macro is parsetime or not. |
boolean |
isRecursive()
Whether to recursively parse the output of this the macro. |
String |
process(TemplateParams ctx,
String name,
String args)
This method is called with given block context whenever a macro with registered name is found inside the tempalate. |
Method Detail |
public String getName()
public boolean isParsetime()
public boolean isRecursive()
public String process(TemplateParams ctx, String name, String args)
TemplateParams.findParam(java.lang.String, boolean)
,
Template.addParam(java.lang.String, java.lang.Object)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |