public class EmbeddedHelper extends java.lang.Object implements Helper<java.lang.String>
<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>
Modifier and Type | Field and Description |
---|---|
static Helper<java.lang.String> |
INSTANCE
A singleton instance of this helper.
|
static java.lang.String |
NAME
The helper's name.
|
Constructor and Description |
---|
EmbeddedHelper() |
Modifier and Type | Method and Description |
---|---|
java.lang.CharSequence |
apply(java.lang.String path,
Options options)
Apply the helper to the context.
|
public static final Helper<java.lang.String> INSTANCE
public static final java.lang.String NAME
Copyright © 2010 - 2020 Adobe. All Rights Reserved