Skip to content

Instantly share code, notes, and snippets.

@salsa-nathan
Created September 19, 2019 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save salsa-nathan/14678fc2249dc2c1612bbe603651a5cf to your computer and use it in GitHub Desktop.
Save salsa-nathan/14678fc2249dc2c1612bbe603651a5cf to your computer and use it in GitHub Desktop.
CKAN - Add <meta name="DCTERMS.creator" ... > tag to dataset and resource detail pages to assist GTM in matching datasets and resources to CKAN organisations.
{% ckan_extends %}
{% block meta %}
{{ super() }}
{% if c.controller in ['dataset', 'package'] %}
{% if c.action in ['read', 'resource_read'] and c.pkg_dict['organization'] and c.pkg_dict['organization']['title'] %}
<meta name="DCTERMS.creator" content="c=AU; o=YOUR_ORGANISATION; ou={{ c.pkg_dict['organization']['title'] }}" scheme="AGLSTERMS.GOLD" />
{% endif %}
{% endif %}
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment