{# Variables - activePage (\Mautic\PageBundle\Entity\Page) - variants - translations - permissions - stats - abTestResults - security - pageUrl - previewUrl - logs - dateRangeForm @todo - add landing page stats/analytics #} {# Only show A/B test button if not already a translation of an a/b test #} {% set allowAbTest = (activePage.isPreferenceCenter or (activePage.isTranslation(true) and translations.parent.isVariant)) ? false : true %} {% extends '@MauticCore/Default/content.html.twig' %} {% block mauticContent %}page{% endblock %} {% block preHeader %} {{ include('@MauticCore/Helper/page_actions.html.twig', { 'item': activePage, 'customButtons': customButtons|default([]), 'templateButtons': { 'close': securityHasEntityAccess( permissions['page:pages:viewown'], permissions['page:pages:viewother'], activePage.createdBy), }, 'routeBase': 'page', 'targetLabel': 'mautic.page.pages'|trans }) }} {{ include('@MauticCore/Modules/category--inline.html.twig', {'category': activePage.category}) }} {{ include('@MauticProject/Modules/projects.html.twig', {'item': activePage}) }} {% endblock %} {% block headerTitle %}{{ activePage.title }}{% endblock %} {% block actions %} {{ include('@MauticCore/Helper/page_actions.html.twig', { 'item': activePage, 'customButtons': customButtons|default([]), 'templateButtons': { 'edit': securityHasEntityAccess(permissions['page:pages:editown'], permissions['page:pages:editother'], activePage.createdBy), 'abtest': allowAbTest and permissions['page:pages:create'], 'clone': permissions['page:pages:create'], 'delete': securityHasEntityAccess(permissions['page:pages:deleteown'], permissions['page:pages:deleteown'], activePage.createdBy), }, 'routeBase': 'page', }) }} {% endblock %} {% block publishStatus %} {{- include('@MauticCore/Helper/publishstatus_badge.html.twig', { 'entity': activePage, 'status': 'available' }) -}}
{% set blueTags = [] %} {% set grayTags = [] %} {% if activePage.isPreferenceCenter %} {% set blueTags = blueTags|merge([{ type: 'read-only', color: 'blue', icon_only: true, label: 'mautic.email.form.preference_center', icon: 'ri-equalizer-2-fill' }]) %} {% endif %} {% if activePage.isTranslation and not activePage.isTranslation(true) %} {% set blueTags = blueTags|merge([{ color: 'blue', label: 'mautic.core.icon_tooltip.translation', icon: 'ri-translate', icon_only: true }]) %} {% endif %} {% if activePage.noIndex is defined and activePage.noIndex == 1 %} {% set blueTags = blueTags|merge([{ label: 'mautic.core.tag.search_index.disabled'|trans, icon: 'ri-eye-off-fill', color: 'blue', icon_only: true }]) %} {% endif %} {% if activePage.isVariant and not activePage.isVariant(true) %} {% set grayTags = grayTags|merge([{ type: 'read-only', color: 'warm-gray', label: 'mautic.email.icon_tooltip.abtest' }]) %} {% endif %} {% if activePage.isVariant(true) %} {% set grayTags = grayTags|merge([{ color: 'warm-gray', label: 'mautic.core.variant_of'|trans({'%parent%' : variants.parent.getName()}), icon: 'ri-organization-chart' }]) %} {% endif %} {% if activePage.isTranslation(true) %} {% set grayTags = grayTags|merge([{ color: 'warm-gray', label: 'mautic.core.translation_of'|trans({'%parent%' : translations.parent.getName()}), icon: 'ri-translate', attributes: { 'href': path('mautic_page_action', {'objectAction': 'view', 'objectId': translations.parent.id}) } }]) %} {% endif %} {% if activePage.language is defined and activePage.language is not empty %} {% set grayTags = grayTags|merge([{ label: activePage.language|language_name, icon: 'ri-translate-2', color: 'warm-gray', attributes: { 'data-toggle': 'tooltip', 'data-placement': 'top', 'title': 'mautic.core.language'|trans } }]) %} {% endif %} {% include '@MauticCore/Helper/_tag.html.twig' with { tags: blueTags|merge(grayTags) } %} {% endblock %} {% block content %} {% set variantContent = include('@MauticCore/Variant/index.html.twig', { 'activeEntity': activePage, 'variants': variants, 'abTestResults': abTestResults, 'model': 'page', 'actionRoute': 'mautic_page_action', 'nameGetter': 'getTitle', })|trim %} {% set showVariants = variantContent is not empty %} {% set translationContent = include('@MauticCore/Translation/index.html.twig', { 'activeEntity': activePage, 'translations': translations, 'model': 'page', 'actionRoute': 'mautic_page_action', 'nameGetter': 'getTitle', })|trim %} {% set showTranslations = translationContent is not empty %}