Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (30 sloc) 1.55 KB
{% load sekizai_tags %}
{% addtoblock "js" %}
<script type="text/javascript">
CMS.$(document).ready(function () {
new CMS.Placeholder('#cms_placeholder-{{ instance.pk }}', {
'type': 'holder',
'plugin_id': '{{ instance.pk }}',
'plugin_type': '{{ instance.plugin_type }}',
'placeholder_id': '{{ instance.placeholder.id }}',
'placeholder_slot': '{{ instance.placeholder.slot }}',
'allow_children': {{ instance.get_plugin_class.allow_children|yesno:"true,false" }},
'page_language': '{{ language }}',{% if child_plugin_classes %}
'child_classes' : [
{% for class, name in child_plugin_classes %}
{'class_name':'{{ class }}', 'plugin_name':'{{ name }}'}{% if not forloop.last %},{% endif %}
{% endfor %}
],{% endif %}
'urls': {
'remove_plugin': '{{ instance.placeholder.get_remove_url }}',
'move_plugin': '{{ instance.placeholder.get_move_url }}',
'change_list': '{{ instance.placeholder.get_changelist_url }}',
'add_plugin': '{{ instance.placeholder.get_add_url }}',
'change_list': '{{ instance.placeholder.get_changelist_url }}'
}
});
});
</script>
{% endaddtoblock %}
<div id="cms_placeholder-{{ instance.pk }}" class="cms_placeholder cms_placeholder_slot::{{ instance.placeholder.slot }}">{% if instance.get_plugin_class.allow_children %}{{ instance.get_plugin_class.name }}{% else %}{{ rendered_content }}{% endif %}</div>
{% if instance.get_plugin_class.allow_children %}<div id="cms_placeholdercontent-{{ instance.pk }}">{{ rendered_content }}</div>{% endif %}
Something went wrong with that request. Please try again.