{% if not schemaOrgType %} {% set schemaOrgType = 'Thing' %} {% endif %} {% if not collection and not config.itemLayout.value and element.translated.config %} {% set config = element.translated.config %} {% endif %} {% set imageContent %} {% block moorl_listing_item_image %} {% if media.url %} {% set imageCss = [] %} {% if config.itemLayout.value == 'avatar' %} {% set imageCss = imageCss|merge([ "height:#{config.itemWidth.value}", "width:#{config.itemWidth.value}", ]) %} {% endif %} {% sw_thumbnails 'moorl-listing-item-image-thumbnails' with { media: media, attributes: { 'itemprop': 'image', 'alt': title, 'class': "is-#{config.displayMode.value}", 'style': imageCss|join(';'), 'title': '', 'loading': 'lazy' } } %} {% elseif config.itemLayout.value == 'image-or-title' %}
{% if config.sanitize.value %} {{ title|sw_sanitize }} {% else %} {{ title|raw }} {% endif %}
{% else %} {% sw_icon 'placeholder' style { 'size': 'fluid' } %} {% endif %} {% endblock %} {% endset %} {% set itemContent %} {% block moorl_foundation_listing_item %} {% if config.listingLayout.value == 'search-suggest' %} {# Clone of "storefront/layout/header/search-suggest.html.twig" #} {% block moorl_listing_search_suggest_item %}
  • {% if media.url %} {% sw_thumbnails 'search-suggest-product-image-thumbnails' with { media: media, sizes: { 'default': '100px' }, attributes: { 'class': 'search-suggest-product-image', 'alt': (media.translated.alt ?: ''), 'title': (media.translated.title ?: '') } } %} {% else %} {% sw_icon 'placeholder' style { 'size': 'lg' } %} {% endif %}
    {{ title }}
    {{ meta }}
  • {% endblock %} {% else %} {% if config.hasButton.value or not url %} {{ imageContent }} {% else %}
    {{ imageContent }}
    {% endif %} {% if config.itemLayout.value != 'image-or-title' %}
    {% block moorl_foundation_listing_item_content %}
    {% block moorl_foundation_listing_item_title %} {% if config.sanitize.value %} {{ title|sw_sanitize }} {% else %} {{ title|raw }} {% endif %} {% endblock %}
    {% if meta %}
    {% block moorl_foundation_listing_item_meta %} {{ meta }} {% endblock %}
    {% endif %} {% if description %}
    {% block moorl_foundation_listing_item_description %} {% if config.sanitize.value %} {{ description|length > config.contentLength.value ? description|striptags|slice(0, config.contentLength.value) ~ '...' : description|striptags }} {% else %} {{ description|raw }} {% endif %} {% endblock %}
    {% endif %} {% if config.hasButton.value %} {% block moorl_foundation_listing_item_button_label %} {{ config.buttonLabel.value ?? "moorl-foundation.search.moreButton"|trans }} {% endblock %} {% endif %} {% endblock %}
    {% endif %} {% endif %} {% endblock %} {% endset %} {% if config.listingLayout.value == 'search-suggest' %} {{ itemContent }} {% elseif config.itemLayout.value == 'custom' %}
  • {% sw_include config.itemLayoutTemplate.value %}
  • {% elseif config.hasButton.value or not url %}
  • {{ itemContent }}
  • {% else %}
  • {{ itemContent }}
  • {% endif %}