Skip to content

Instantly share code, notes, and snippets.

Last active April 20, 2021 16:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Digital-Grinnell/436cd922a5c855635b931d05cf8a242a to your computer and use it in GitHub Desktop.
Digital-Grinnell-Organizations-and-Profiles-MADS-Twig-Template Rev 2
{# Digital_Grinnell_Organization_MADS.twig Revision 2
THE official copy of this Twig template can be found as a Gist at
This TWIG template for IMI import is intended to serve as a general-purpose
starting point for MADS Organization import into Digital Grinnell.
History --------------------
Rev 2
Corrected XML statement and made related_names conditional.
Rev 1
Creating from scratch. Very simple template strictly for use with data supplied by Liz on 2021-04-19.
{% block content %}
{% autoescape false %}
<?xml version="1.0" encoding="UTF-8"?>
<mads xmlns="" xmlns:xlink="" xmlns:xsi="" xmlns:mads="">
<namePart>{{ data.department_name }}</namePart>
{% if data.related_names %}
<namePart>{{ data.related_names }}</namePart>
{% endif %}
<identifier type="u2">{{ data.catalog_code }}</identifier>
<url>{{ data.url }}</url>
{% endautoescape %}
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment