Class EditContentHandlebarsHelper
- java.lang.Object
-
- com.terminalfour.publish.handlebars.helper.BaseHelper
-
- com.terminalfour.publish.handlebars.helper.edit.EditContentHandlebarsHelper
-
- All Implemented Interfaces:
com.github.jknack.handlebars.Helper<Object>
@Component public class EditContentHandlebarsHelper extends BaseHelper
The {{editContent}} handlebars helper outputs a URL to allow an end-user to edit the currently publishing Content Item.If there is no Content Item publishing, this helper returns a blank string.
Usage
<a href="{{editContent}}">Edit this Content Item</a>
The editContent handlebars expression is a simple expression that outputs the URL required to open the standard Terminalfour UI editor for the Content Item that is currently publishing.
As can be seen in the example above, the web developer is responsible for utilizing this URL within a link.
-
-
Constructor Summary
Constructors Constructor Description EditContentHandlebarsHelper(IPageAPI pageApi)
-
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
-
EditContentHandlebarsHelper
@Autowired public EditContentHandlebarsHelper(IPageAPI pageApi)
-
-
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.
-
-