templates/bundles/SyliusAdminBundle/Layout/_channelLinks.html.twig line 1

Open in your IDE?
  1. {% if channels|length > 1 %}
  2.     <div class="ui simple dropdown item channel-selector">
  3.         <span class="channel-icon">🌐</span>
  4.         <i class="dropdown icon"></i>
  5.         <div class="menu">
  6.             {% for channel in channels|filter(channel => channel.hostname is not empty) %}
  7.                 <a href="{{ (app.request.secure ? 'https://' : 'http://') ~ channel.hostname }}" target="_blank" class="item">
  8.                     {% include '@SyliusAdmin/Common/_channel.html.twig' %}
  9.                 </a>
  10.             {% endfor %}
  11.         </div>
  12.     </div>
  13. {% elseif channels|length == 1 %}
  14.     {% set channel = channels|first %}
  15.     {% if channel.hostname is not empty %}
  16.         <a href="{{ (app.request.secure ? 'https://' : 'http://') ~ channel.hostname }}" target="_blank" class="item channel-selector">
  17.             <span class="channel-icon">🌐</span>
  18.         </a>
  19.     {% endif %}
  20. {% endif %}