Digital-Grinnell-Organizations-and-Profiles-MADS-Twig-Template Rev 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# Digital_Grinnell_Organization_MADS.twig Revision 2 | |
THE official copy of this Twig template can be found as a Gist at | |
https://gist.github.com/Digital-Grinnell/436cd922a5c855635b931d05cf8a242a | |
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="http://www.loc.gov/mads/v2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mads="http://www.loc.gov/mads/v2"> | |
<authority> | |
<name> | |
<namePart>{{ data.department_name }}</namePart> | |
</name> | |
</authority> | |
{% if data.related_names %} | |
<related> | |
<name> | |
<namePart>{{ data.related_names }}</namePart> | |
</name> | |
</related> | |
{% endif %} | |
<identifier type="u2">{{ data.catalog_code }}</identifier> | |
<url>{{ data.url }}</url> | |
</mads> | |
{% endautoescape %} | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment