{% load template_tags %} Place {% include 'html_export/milligram.htm' %} {% include 'html_export/custom_style.htm' %}
{% include 'html_export/custom_header.htm' %}

Places

{% for resource in resources %} {% with resource_data=resource.resource %}

{{ resource.displayname }}

{# System Ref #} {% if resource_data|has_key:"System Reference Numbers" %}

System Reference Numbers

Primary Reference Number: {{ resource_data|val_from_key:"System Reference Numbers"|val_from_key:"PrimaryReferenceNumber"|val_from_key:"Primary Reference Number"|val_from_key:"@display_value" }}
Legacy ID: {{ resource_data|val_from_key:"System Reference Numbers"|val_from_key:"LegacyID"|val_from_key:"Legacy ID"|val_from_key:"@display_value" }}


{% endif %} {# Place Names #} {% if resource_data|has_key:"Names" %}

Place Names

Name
Name Type
{% for names in resource_data|val_from_key:"Names" %}
{% if names|has_key:"Placename" %} {{ names|val_from_key:"Placename"|val_from_key:"@display_value" }} {% endif %}
{% if names|has_key:"Placename Use Type" %} {{ names|val_from_key:"Placename Use Type"|val_from_key:"@display_value" }} {% endif %}
{% endfor %}

{% endif %} {# Place Type #} {% if resource_data|has_key:"Place Type" %}

Place Type

{{ resource_data|val_from_key:"Place Type"|val_from_key:"@display_value" }}


{% endif %} {# Location Data #} {% if resource_data|has_key:"Localities/Administrative Areas" or "Addresses" %}

Location Information

Localities/Administrative Area Types

{% if resource_data|has_key:"Localities/Administrative Area Types" %} {% for area in resource_data|val_from_key:"Localities/Administrative Area Types" %} {# there is a bug that passes a dict if there are no addresses in this branch... let's check for a key to stop this from causing odd artifacts #} {% if area|has_key:"Area Type" %} {{ area|val_from_key:"Area Type"|val_from_key:"@display_value" }}
{% endif %} {% endfor %} {% endif %}

{# there is a bug that passes a dict if there are no addresses in this branch... let's check for a key to stop this from causing odd artifacts #} {% with address_check=resource_data|val_from_key:"Addresses" %} {% if address_check.0|has_key:"Full Address" %}

Addresses

Full Address
Locality
{% for address in resource_data|val_from_key:"Addresses" %}
{{ address|val_from_key:"Full Address"|val_from_key:"@display_value" }}
{{ address|val_from_key:"Locality"|val_from_key:"Locality Value"|val_from_key:"@display_value" }}
{% endfor %}
{% endif %} {% endwith %}

{% endif %} {# Place Description #} {% if resource_data|has_key:"Descriptions" %}

Place Description

{{ resource_data|val_from_key:"Descriptions"|val_from_key:"Description"|val_from_key:"@display_value"|safe }}


{% endif %} {# External Cross References #} {% if resource_data|has_key:"External Cross References" %}

External Cross References

External Cross Reference
External Cross Reference Source
URL
{% for exref in resource_data|val_from_key:"External Cross References" %}
{{ exref|val_from_key:"External Cross Reference"|val_from_key:"@display_value" }}
{{ exref|val_from_key:"External Cross Reference Source"|val_from_key:"@display_value" }}
{% with exref|val_from_key:"URL" as URL %} {% if URL|has_key:"url" and URL|has_key:"url_label" %} {{URL|val_from_key:'url_label'}} {% elif URL|has_key:"url_label" %} {{URL|val_from_key:"url_label"}} {% elif URL|has_key:"url" %} {{URL|val_from_key:'url'}} {% else %}
{% endif %} {% endwith %}
{% endfor %}

{% endif %} {% endwith%} {% endfor %}