public List<? extends Node> getSuperBlock() { if (superBlock != null) { return superBlock; } if (parent != null) { return parent.getSuperBlock(); } return null; }
@JinjavaDoc(value = "Only usable within blocks, will render the contents of the parent block by calling super.", snippets = { @JinjavaSnippet(desc = "This gives back the results of the parent block", code = "{% block sidebar %}\n" + " <h3>Table Of Contents</h3>\n\n" + " ...\n" + " {{ super() }}\n" + "{% endblock %}") }) public static String renderSuperBlock() { JinjavaInterpreter interpreter = JinjavaInterpreter.getCurrent(); LengthLimitingStringBuilder result = new LengthLimitingStringBuilder(interpreter.getConfig().getMaxOutputSize()); List<? extends Node> superBlock = interpreter.getContext().getSuperBlock(); if (superBlock != null) { for (Node n : superBlock) { result.append(n.render(interpreter)); } } return result.toString(); }