{% extends "_layouts/cp" %} {% set elementInstance = craft.app.elements.createElement(elementType) %} {% set context = 'index' %} {% if not elementInstance %} {% exit 404 %} {% endif %} {% set sources = craft.app.elementIndexes.getSources(elementType, 'index') %} {% set customizableSources = (sources is not empty and context == 'index' and currentUser.admin) %} {% set showSiteMenu = (craft.app.getIsMultiSite() ? (showSiteMenu ?? 'auto') : false) %} {% if showSiteMenu == 'auto' %} {% set showSiteMenu = elementInstance.isLocalized() %} {% endif %} {% block contextMenu %} {% if showSiteMenu %} {% include "_elements/sitemenu" %} {% endif %} {% endblock %} {% block sidebar %} {% if sources is not empty %} {% if customizableSources %}
{% endif %} {% endif %} {% endblock %} {% block content %}
{% include "_elements/indexcontainer" with { showSiteMenu: false } %}
{% endblock %} {% block initJs %} Craft.elementIndex = Craft.createElementIndex('{{ elementType|e("js") }}', $('#main'), { context: '{{ context }}', storageKey: 'elementindex.{{ elementType|e("js") }}', criteria: Craft.defaultIndexCriteria }); {% endblock %} {% js block('initJs') %}