public class BlockHelper extends Object implements Helper<Object>
The block helper will replace its section with the partial of the same name if it exists.
If delete-after-merge
is set to true
, the partial will be delete once
applied it.
{{block "title" [delete-after-merge=false]}}
Modifier and Type | Field and Description |
---|---|
static Helper<Object> |
INSTANCE
A singleton instance of this helper.
|
static String |
NAME
The helper's name.
|
Constructor and Description |
---|
BlockHelper() |
Modifier and Type | Method and Description |
---|---|
Object |
apply(Object context,
Options options)
Apply the helper to the context.
|
public static final String NAME
public Object apply(Object context, Options options) throws IOException
Helper
apply
in interface Helper<Object>
context
- The context object.options
- The options object.IOException
- If a template cannot be loaded.Copyright © 2021. All rights reserved.