Class LanguageCodeHandlebarsHelper
- java.lang.Object
-
- com.terminalfour.publish.handlebars.helper.BaseHelper
-
- com.terminalfour.publish.handlebars.helper.language.LanguageCodeHandlebarsHelper
-
- All Implemented Interfaces:
com.github.jknack.handlebars.Helper<Object>
@Component public class LanguageCodeHandlebarsHelper extends BaseHelper
The {{languageCode}} handlebars helper outputs the language of the currently publishing page.Usage
{{languageCode}}
The languageCode handlebars expression is a simple tag that does not contain any configurable attributes.
-
-
Constructor Summary
Constructors Constructor Description LanguageCodeHandlebarsHelper(ILanguageAPI languageAPI)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
apply(Object context, com.github.jknack.handlebars.Options options)
Theapply
method is the main entry point for handlebars.java helpers.
-
-
-
Constructor Detail
-
LanguageCodeHandlebarsHelper
@Autowired public LanguageCodeHandlebarsHelper(ILanguageAPI languageAPI)
-
-
Method Detail
-
apply
public String apply(Object context, com.github.jknack.handlebars.Options options)
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.
-
-