Class org.jfouffa.jslider.template.DefaultTemplate
java.lang.Object
|
+----org.jfouffa.jslider.template.DefaultTemplate
- public class DefaultTemplate
- extends Object
- implements TemplateHandler
The template handler for dynamic macro.
A dynamic macro is a macro that can be deduce from the template.
For example, the macro currentPage is not defined in the template,
so the template loader invoke the function getDynamicMacro to find
the value.
Constructor index
-
DefaultTemplate()
-
Method index
-
getDynamicMacro(String)
- The handler function.
Constructors
DefaultTemplate
public DefaultTemplate()
Methods
getDynamicMacro
public String getDynamicMacro(String name)
- The handler function. By default, it returns the complete
macro ("&<the-name>;").
public String getDynamicMacro(String name) {
if (name.equals(MY_MACRO)) {
return MY_REPLACED_TEXT;
}
// don't forget to invoke the super ...
return super(name);
}