Address Listing
The address listing component is used to display search results for affiliates or Restores. It's not used within the main site search results.
Pickens County HFH
Clemson, SC
Physical address
(N/A)
{{ attach_library('h4h_theme/address-listing') }}
{% import '@h4h_theme/icons/icons.twig' as icons %}
{% set has_address = (physical_address.0.address_line1['#value'] is not empty) or (physical_address.0.address_line2['#value'] is not empty) %}
<article class="address-listing{{ type == 'restore_store' ? " address-listing__restore" }}">
<div class="address-listing__header">
<{{ heading }} class="address-listing__heading">
{# If this is a Restore don't link the title to it's node. #}
{% if type == 'restore_store' %}
{{ label }}
{% else %}
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
{% endif %}
</{{ heading }}>
{% if city and state and type == 'restore_store' %}
<span class="address-listing__right">
{{ city }}, {{ state }}
</span>
{% endif %}
</div>
<div class="address-listing__body-container">
<div class="address-listing__items">
{% if website %}
<div class="address-listing__item">
{{ icons.get('website', 'icon--small-website icon--oslo-gray') }} {{ website }}
</div>
{% endif %}
{% if email %}
<div class="address-listing__item">
{{ icons.get('mail', 'icon--small-mail icon--oslo-gray') }}<a href="mailto:{{ email }}"> {{ email }}</a>
</div>
{% endif %}
{% if phone %}
<div class="address-listing__item">
{{ icons.get('phone', 'icon--small-phone icon--oslo-gray') }} {{ phone }}
</div>
{% endif %}
</div>
</div>
<div class="address-listing__body-container">
<span class="address-listing__address-header">{{ "Physical address"|t}}</span>
{% if (physical_address|render) and (has_address) %}
{{ physical_address|raw }}
{% else %}
({{ "N/A"|t}})
{% endif %}
</div>
<div class="address-listing__body-container">
{% if type != 'restore_store' %}
<span class="address-listing__address-header">{{ "Mailing address"|t}}</span>
{% if mailing_address|render %}
{{ mailing_address|raw }}
{% else %}
({{ "N/A"|t}})
{% endif %}
{% endif %}
</div>
</article>