Class EmbeddedHelper
java.lang.Object
com.github.jknack.handlebars.helper.EmbeddedHelper
@Deprecated(since="2024-07-10")
public class EmbeddedHelper
extends Object
implements Helper<String>
Deprecated.
com.github.jknack.handlebars.helper package is deprecated and marked for removal in subsequent releases which will involve removal of the handlebars dependency in AEM.
Given:
home.hbs
<html>
...
{{emdedded "user" ["id"]}}
</html>
where user.hbs is:
<tr>
<td>{{firstName}}</td>
<td>{{lastName}}</td>
</tr>
expected output is:
<script id="user-hbs" type="text/x-handlebars-template">
<tr>
<td>{{firstName}}</td>
<td>{{lastName}}</td>
</tr>
</script>
Optionally, a user can set the template's name:
{{emdedded "user" "user-tmpl" }}
expected output is:
<script id="user-tmpl" type="text/x-handlebars-template">
<tr>
<td>{{firstName}}</td>
<td>{{lastName}}</td>
</tr>
</script>
- Since:
- 0.3.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
INSTANCE
Deprecated.A singleton instance of this helper. -
NAME
Deprecated.The helper's name.- See Also:
-
-
Constructor Details
-
EmbeddedHelper
public EmbeddedHelper()Deprecated.
-
-
Method Details
-
apply
Deprecated.Description copied from interface:HelperApply the helper to the context.- Specified by:
applyin interfaceHelper<String>- Parameters:
path- The context object.options- The options object.- Returns:
- A string result.
- Throws:
IOException- If a template cannot be loaded.
-