Skip to content

Instantly share code, notes, and snippets.

@LukeTully
Created June 19, 2019 02:58
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 LukeTully/a2ce3ad90789449c87aa76096d87a6fe to your computer and use it in GitHub Desktop.
Save LukeTully/a2ce3ad90789449c87aa76096d87a6fe to your computer and use it in GitHub Desktop.
Modify repeating output template
# In a custom plugin, you can put this in templates/scheming/display_snippets/{yournamehere}.html
# If you're using ckanext-scheming, you can set the display_snippet on your field to {yournamehere}.html
{%- set values = data[field.field_name] -%}
<ol> {%- for contributer in values -%}
# Access the keys of each field dict and print them as you please
<li>{{ contributer['name'] }}</li>
{%- endfor -%}
</ol>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment