custom/apps/FuexcImageCDN/Resources/views/storefront/page/content/detail.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/content/detail.html.twig' %}
  2. {% block page_content_section %}
  3.     {% set foxDomainReplace = {} %}
  4.     {% if config('FuexcImageCDN.config.cdnUrl')and config('FuexcImageCDN.config.rewriteBackgroundImages') %}
  5.         {% set foxDomainReplace = {
  6.             "https://cdn.shopware.store": config('FuexcImageCDN.config.cdnUrl')|trim('/')
  7.         } %}
  8.         {% for salesChannelDomain in context.salesChannel.domains %}
  9.             {% set foxDomain = salesChannelDomain.url|split('//') %}
  10.             {% if foxDomain|length == 1 %}
  11.                 {% set foxDomain = "#{(foxDomain[0]|split('/')[0])}" %}
  12.             {% elseif foxDomain|length == 2 %}
  13.                 {% set foxDomain = "#{foxDomain[0]}//#{(foxDomain[1]|split('/')[0])}" %}
  14.             {% endif %}
  15.             {% set foxDomainReplace = foxDomainReplace|merge({
  16.                 (foxDomain): config('FuexcImageCDN.config.cdnUrl')|trim('/')
  17.             }) %}
  18.         {% endfor %}
  19.     {% endif %}
  20.     {% set sectionBgImg = sectionBgImg | replace(foxDomainReplace) %}
  21.     {{ parent() }}
  22. {% endblock %}