Class MetaHandlebarsHelper
- java.lang.Object
-
- com.terminalfour.publish.handlebars.helper.BaseHelper
-
- com.terminalfour.publish.handlebars.helper.page.meta.MetaHandlebarsHelper
-
- All Implemented Interfaces:
com.github.jknack.handlebars.Helper<Object>
@Component public class MetaHandlebarsHelper extends BaseHelper
The {{meta ...}} handlebars helper meta tags and their associated Section values to be published.Usage
The {{meta ...}} handlebars helper is a simple helper to allow meta tag data defined on a Section to be published.
Attributes
- id - The id attribute is required and must be set to the id of the Meta Tag to be processed.
Example
{{meta id="6"}}
In the above example, the Meta Tag with id 6 should be processed.
-
-
Constructor Summary
Constructors Constructor Description MetaHandlebarsHelper(IMetaAPI metaApi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
apply(Object context, com.github.jknack.handlebars.Options options)
Theapply
method is the main entry point for handlebars.java helpers.
-
-
-
Constructor Detail
-
MetaHandlebarsHelper
@Autowired public MetaHandlebarsHelper(IMetaAPI metaApi)
-
-
Method Detail
-
apply
public Object apply(Object context, com.github.jknack.handlebars.Options options) throws IOException
Description copied from class:BaseHelper
Theapply
method is the main entry point for handlebars.java helpers.It is called internally by the handlebars.java engine when a matching handlebars.java expression is encountered.
- Specified by:
apply
in interfacecom.github.jknack.handlebars.Helper<Object>
- Specified by:
apply
in classBaseHelper
- Parameters:
context
- The currently executing context.options
- The options.- Returns:
- The generated output.
- Throws:
IOException
- If processing of the expressions fails.
-
-