Class EditSectionHandlebarsHelper

  • All Implemented Interfaces:
    com.github.jknack.handlebars.Helper<Object>

    @Component
    public class EditSectionHandlebarsHelper
    extends BaseHelper
    The {{editSection}} handlebars helper outputs a URL to allow an end-user to open the Section that is being published in the standard Terminalfour UI for editing.

    Usage

      <a href="{{editSection}}">Edit this section</a>
     

    The editSection handlebars expression is a simple expression that outputs the URL required to open the current Section for editing in the standard Terminalfour UI.

    As can be seen in the example above, the web developer is responsible for utilizing this URL within a link.

    • Constructor Detail

      • EditSectionHandlebarsHelper

        @Autowired
        public EditSectionHandlebarsHelper​(IPageAPI pageApi)
    • Method Detail

      • apply

        public String apply​(Object context,
                            com.github.jknack.handlebars.Options options)
        Description copied from class: BaseHelper
        The apply 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 interface com.github.jknack.handlebars.Helper<Object>
        Specified by:
        apply in class BaseHelper
        Parameters:
        context - The currently executing context.
        options - The options.
        Returns:
        The generated output.