add partials support
This commit is contained in:
parent
036434dd7a
commit
bea662e2e7
7 changed files with 44 additions and 3 deletions
|
@ -24,6 +24,11 @@
|
|||
{% block js %}
|
||||
<script>
|
||||
$(function(){
|
||||
{% if partials %}
|
||||
{% for name, value in partials.items() %}
|
||||
Handlebars.registerPartial({{ name|tojson|safe }}, {{ value.data|tojson|safe }});
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
$("#page-content").html(MDR.convert({{ page.data|tojson|safe }})).show();
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue