{% extends "sprout-base-email/_layouts/elementindex" %} {% set title = "Notification Email"|t('sprout-base') %} {% set elementType = 'barrelstrength\\sproutbase\\app\\email\\elements\\NotificationEmail' %} {% set currentPluginHandle = craft.app.request.getSegment(1) %} {% block actionButton %}
{{ "New Notification"|t('sprout-base') }}
{% endblock %} {% block content %} {{ parent() }} {% include "sprout-base-email/_modals/base" %} {% endblock %} {% block initJs %} // Pass segment to the NotificationEmailQuery class to filter notification entries var pluginHandle = {'base': '{{ craft.app.request.getSegment(1) }}'}; var criteria = Object.assign(Craft.defaultIndexCriteria, pluginHandle); Craft.elementIndex = Craft.createElementIndex('{{ elementType|e("js") }}', $('#main'), { context: '{{ context }}', storageKey: 'elementindex.{{ elementType }}', criteria: criteria, hideSidebar: '{{ hideSidebar ?? false }}' }); $('#main-content').removeClass('has-sidebar'); {% endblock %}