Inject values of the variable.

Hello bar!



rules.add("/var-injection/{name}/{age}", "/templates/variableinjection.html").priority(1);
		<!-- the default "render" method of SimpleSnippet will be used -->
		<div afd:render="SimpleSnippet">title here</div>

		<afd:snippet render="SimpleSnippet:setProfileByVariableInjection">
			<p id="name">name:<span>dummy name</span></p>
			<p id="age">age:<span>0</span></p>
public Renderer render(String name) {
    // replace the whole title node
    if (StringUtils.isEmpty(name)) {
        name = "Asta4D";
    Element element = ElementUtil.parseAsSingle("<div>Hello " + name + "!</div>");
    return Renderer.create(":root", element);

public Renderer setProfileByVariableInjection(String name, int age) {
    Renderer render = Renderer.create();
    render.add("p#name span", name);
    render.add("p#age span", age);
    return render;