1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- {#
- /**
- * @file
- * Default template for the 'plain' address formatter.
- *
- * Available variables:
- * - given_name: Given name.
- * - additional_name: Additional name.
- * - family_name: Family name.
- * - organization: Organization.
- * - address_line1: First address line.
- * - address_line2: Second address line.
- * - postal_code: Postal code.
- * - sorting_code: Sorting code.
- * - dependent_locality: The dependent locality.
- * - dependent_locality.code: Dependent locality code.
- * - dependent_locality.name: Dependent locality name.
- * - locality: The locality subdivision.
- * - locality.code: Locality code.
- * - locality.name: Locality name.
- * - administrative_area: The administrative area subdivision.
- * - administrative_area.code: Administrative area code.
- * - administrative_area.name: Administrative area name.
- * - country: The country.
- * - country.code: Country code.
- * - country.name: Country name.
- * - address: An object that implements \Drupal\address\AddressInterface
- * representing the address to be rendered. Only public methods can be used.
- * - view_mode: View mode of the entity being rendered that this address field
- * is attached to. For example, "teaser" or "full".
- *
- * if a subdivision (dependent_locality, locality, administrative_area) was
- * entered, the array will always have a code. If it's a predefined subdivision,
- * it will also have a name. The code is always preferred.
- *
- * @ingroup themeable
- */
- #}
- <p class="address" translate="no">
- {% if given_name or family_name %}
- <span class=""> {{ given_name }} {{ family_name }} </span><br>
- {% endif %}
- {% if organization %}
- <span class="">{{ organization }}</span><br>
- {% endif %}
- {% if address_line1 %}
- <span class=""> {{ address_line1 }} </span><br>
- {% endif %}
- {% if address_line2 %}
- <span class="">{{ address_line2 }} </span><br>
- {% endif %}
- {% if dependent_locality.code %}
- <span class="locality"> {{ dependent_locality.code }} </span><br>
- {% endif %}
- {% if locality.code or postal_code or administrative_area.code %}
- <span class="postal-code"> {{ locality.code }} {{ postal_code }} {{ administrative_area.code }} </span><br>
- {% endif %}
- <span class="country">{{ country.name }}</span>
- </p>
|