mustache_templates-8.x-1.0-beta4/templates/mustache.html.twig
templates/mustache.html.twig
{% if use_sync %}
{% for inline_partial in inline_partials %}
{{ inline_partial }}
{% endfor %}
{% if sync.adjacent == "beforebegin" %}
{{ content }}
{% endif %}
{% if sync.wrapper_tag %}<{{ sync.wrapper_tag }}{{ sync.attributes }}>{% endif %}
{% if sync.adjacent is empty or sync.adjacent == "afterbegin" or sync.adjacent == "beforeend" %}
{{ content }}
{% endif %}
<script>
window.mustacheSync = window.mustacheSync || {items: [], templates: []};
{% if not template.summable %}
window.mustacheSync.templates.push({
name: '{{ template.name|raw }}',
content: '{{ template.encoded|raw }}'
});
{% endif %}
{% for item in sync.items %}
window.mustacheSync.items.push({{ '{' }}{% if sync.wrapper_tag %}element: document.getElementById("{{ sync.attributes.id|raw }}"), {% elseif sync.into %}into: "{{ sync.into|raw }}", {% endif %}template: "{{ template.name|raw }}", data: {{ item.data|raw }}{% if item.url %}, url: {{ item.url|raw }}{% endif %}{% if item.eval %}, eval: true{% endif %}{% if item.behaviors is defined %}, behaviors: {{ item.behaviors|raw }}{% endif %}{% if item.select %}, select: {{ item.select|raw }}{% endif %}{% if item.increment %}, increment: {{ item.increment|raw }}{% endif %}{% if item.delay %}, delay: {{ item.delay|raw }}{% endif %}{% if item.period %}, period: {{ item.period|raw }}{% endif %}{% if item.limit %}, limit: {{ item.limit|raw }}{% endif %}{% if item.trigger %}, trigger: {{ item.trigger|raw }}{% endif %}{% if item.adjacent %}, adjacent: {{ item.adjacent|raw }}{% endif %}{% if item.morph %}, morph: {{ item.morph|raw }}{% endif %}{% if item.form %}, form: {{ item.form|raw }}{% endif %}{% if item.object %}, object: {{ item.object|raw }}{% endif %}{% if item.max_age is defined %}, max_age: {{ item.max_age|raw }}{% endif %}});
{% endfor %}
</script>
{% if sync.wrapper_tag %}</{{ sync.wrapper_tag }}>{% endif %}
{% if sync.adjacent == "afterend" %}
{{ content }}
{% endif %}
{% else %}
{{ content }}
{% endif %}
