custom/static-plugins/theme-base/src/Resources/views/storefront/reader/snippet.html.twig line 1

Open in your IDE?
  1. {% block theme_variables %}
  2.     {% set scn="theme." %}
  3.     {% if theme_config('sales-channel-name')|length > 0 %}
  4.         {% set scn=theme_config('sales-channel-name')|lower|sw_sanitize ~ '.' %}
  5.     {% endif %}
  6.     {% set translation=(scn ~ read)|trans|sw_sanitize|trim %}
  7.     {% if translation is same as (scn ~ read) %}
  8.         {% if ("theme." ~ read)|trans|sw_sanitize is same as ("theme." ~ read) %}
  9.             {% set translation=read|sw_sanitize|trim %}
  10.         {% else %}
  11.             {% set translation=("theme." ~ read)|trans|sw_sanitize %}
  12.         {% endif %}
  13.     {% endif %}
  14.     {% if hyperlink %}{% if translation|replace({' ':''}) matches '/^\\+{0,1}(\\d+)$/' %}
  15.     <a href="tel:{{(translation|trim|sw_sanitize)}}">{{ translation }}</a>
  16.     {% elseif translation matches '/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/' %}
  17.     <a href="mailto:{{(translation|trim|sw_sanitize)}}">{{ translation }}</a>{% else %}{{ translation }}
  18.     {% endif %}
  19.     {% else %}
  20.         {% if translation !="!=" %}{{ translation }}
  21.         {% endif %}
  22.     {% endif %}
  23. {% endblock %}
  24. {# TLDR; var read = amoungUs; if snippets theme.amongUs != "translatedText" => if saleschannelname.amongUs != "translatedText" => write amongUs #}