[Changed] reconstructed to fit extending schemata
This commit is contained in:
73
views/twig/extensions/themes/default/layout/base.html.twig
Normal file
73
views/twig/extensions/themes/default/layout/base.html.twig
Normal file
@ -0,0 +1,73 @@
|
||||
{% extends "layout/base.html.twig" %}
|
||||
|
||||
{% block head_meta_robots %}
|
||||
{# Always prepare the data layer to avoid errors #}
|
||||
{% if oViewConf.isGA4enabled() %}
|
||||
{% set d3GtmContainerIdString = oViewConf.getGtmContainerId() %}
|
||||
<script>
|
||||
var dataLayer = {{ oViewConf.getGtmDataLayer() }} || [];
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if oViewConf.isGA4enabled() and oViewConf.D3blShowGtmScript() %}
|
||||
{% if d3GtmContainerIdString %}
|
||||
{% apply spaceless %}
|
||||
{% if oViewConf.isGtmConsentModeSetActivated() %}
|
||||
<script type="text/javascript">
|
||||
{% if oViewConf.d3IsUsercentricsCMPChosen() and oViewConf.d3GetModuleConfigParam('_blEnableMeasurementCapabilities') %}
|
||||
{{ oViewConf.d3GetModuleConfigParam('_sMeasurementCapabilities')|strip }}
|
||||
{% else %}
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
|
||||
gtag("consent", "default", {
|
||||
ad_user_data: "denied",
|
||||
ad_personalization: "denied",
|
||||
ad_storage: "denied",
|
||||
analytics_storage: "denied",
|
||||
wait_for_update: 2000
|
||||
});
|
||||
{% endif %}
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if oViewConf.d3IsUsercentricsCMPChosen() and oViewConf.d3GetModuleConfigParam('_blEnableUsercentricsConsentModeApi') %}
|
||||
<script type="text/javascript">
|
||||
{{ oViewConf.d3GetModuleConfigParam('_sUsercentricsConsentModeApi')|strip }}
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
<!-- Google Tag Manager -->
|
||||
<script {{ oViewConf.getGtmScriptAttributes() }}>
|
||||
(function (w, d, s, l, i) {
|
||||
w[l] = w[l] || [];
|
||||
w[l].push({'gtm.start': new Date().getTime(), event: 'gtm.js'});
|
||||
var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
|
||||
j.async = true;
|
||||
j.src = '{{ oViewConf.getServerSidetaggingJsDomain() }}?id=' + i + dl;
|
||||
f.parentNode.insertBefore(j, f);
|
||||
})(window, document, 'script', 'dataLayer', '{{ d3GtmContainerIdString }}');
|
||||
</script>
|
||||
<!-- End Google Tag Manager -->
|
||||
{% endapply %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block theme_svg_icons %}
|
||||
{% if oViewConf.D3blShowGtmScript() %}
|
||||
{% if oViewConf.getGtmContainerId() %}{% apply spaceless %}
|
||||
<!-- Google Tag Manager (noscript) -->
|
||||
<noscript>
|
||||
<iframe src="{{ oViewConf.getServerSidetaggingNoJsDomain() }}?id={{ oViewConf.getGtmContainerId() }}"
|
||||
height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
||||
</noscript>
|
||||
<!-- End Google Tag Manager (noscript) -->
|
||||
{% endapply %}{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
@ -0,0 +1,9 @@
|
||||
{% extends "page/checkout/basket.html.twig" %}
|
||||
|
||||
{% block checkout_basket_main %}
|
||||
{{ parent() }}
|
||||
|
||||
{% include "@d3googleanalytics4/event/view_cart.html.twig" %}
|
||||
|
||||
{% include "@d3googleanalytics4/event/remove_from_cart.html.twig" %}
|
||||
{% endblock %}
|
@ -0,0 +1,7 @@
|
||||
{% extends "page/checkout/order.html.twig" %}
|
||||
|
||||
{% block checkout_order_main %}
|
||||
{{ parent() }}
|
||||
|
||||
{% include "@d3googleanalytics4/event/add_payment_info.html.twig" %}
|
||||
{% endblock %}
|
@ -0,0 +1,7 @@
|
||||
{% extends "page/checkout/thankyou.html.twig" %}
|
||||
|
||||
{% block checkout_thankyou_main %}
|
||||
{{ parent() }}
|
||||
|
||||
{% include "@d3googleanalytics4/event/purchase.html.twig" %}
|
||||
{% endblock %}
|
@ -0,0 +1,7 @@
|
||||
{% extends "page/checkout/user.html.twig" %}
|
||||
|
||||
{% block checkout_user_main %}
|
||||
{{ parent() }}
|
||||
|
||||
{% include "@d3googleanalytics4/event/begin_checkout.html.twig" %}
|
||||
{% endblock %}
|
@ -0,0 +1,13 @@
|
||||
{% extends "page/details/inc/productmain.html.twig" %}
|
||||
|
||||
{% block details_productmain_title %}
|
||||
{{ parent() }}
|
||||
|
||||
{% include "@d3googleanalytics4/event/view_item.html.twig" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block details_productmain_tobasket %}
|
||||
{{ parent() }}
|
||||
|
||||
{% include '@d3googleanalytics4/event/add_to_cart.html.twig' with {htmlIdAmountOfArticles: '#amountToBasket'} %}
|
||||
{% endblock %}
|
@ -0,0 +1,13 @@
|
||||
{% extends "page/list/list.html.twig" %}
|
||||
|
||||
{% block page_list_productlist %}
|
||||
{{ parent() }}
|
||||
|
||||
{% include "@d3googleanalytics4/event/view_item_list.html.twig" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_list_listbody %}
|
||||
{{ parent() }}
|
||||
|
||||
{% include '@d3googleanalytics4/event/add_to_cart.html.twig' with {htmlIdAmountOfArticles: '#amountToBasket'} %}
|
||||
{% endblock %}
|
@ -0,0 +1,7 @@
|
||||
{% extends "page/search/search.html.twig" %}
|
||||
|
||||
{% block search_results %}
|
||||
{{ parent() }}
|
||||
|
||||
{% include "@d3googleanalytics4/event/view_search_result.html.twig" %}
|
||||
{% endblock %}
|
@ -0,0 +1,7 @@
|
||||
{% extends "page/shop/start.html.twig" %}
|
||||
|
||||
{% block start_welcome_text %}
|
||||
{{ parent() }}
|
||||
|
||||
{% include '@d3googleanalytics4/event/add_to_cart.html.twig' with {htmlIdAmountOfArticles: '#amountToBasket'} %}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user