Class PageLayoutIdHandlebarsHelper
- java.lang.Object
-
- com.terminalfour.publish.handlebars.helper.BaseHelper
-
- com.terminalfour.publish.handlebars.helper.page.PageLayoutIdHandlebarsHelper
-
- All Implemented Interfaces:
com.github.jknack.handlebars.Helper<Object>
@Component public class PageLayoutIdHandlebarsHelper extends BaseHelper
The {{pageLayoutId}} handlebars helper is a simple helper that outputs the ID of the Page Layout assigned to the currently publishing Section.If the Section does not have an explicitly assigned Page Layout, the ID of the Page Layout assigned to the parent Section is output.
Usage
The {{pageLayoutId}} handlebars helper is a simply utility helper that outputs the Page Layout ID.
Example
{{pageLayoutId}}
-
-
Constructor Summary
Constructors Constructor Description PageLayoutIdHandlebarsHelper(ISectionAPI sectionApi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
apply(Object context, com.github.jknack.handlebars.Options options)
Theapply
method is the main entry point for handlebars.java helpers.
-
-
-
Constructor Detail
-
PageLayoutIdHandlebarsHelper
@Autowired public PageLayoutIdHandlebarsHelper(ISectionAPI sectionApi)
-
-
Method Detail
-
apply
public Integer 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.
-
-