layout | menu | title |
---|---|---|
page |
true |
Grants by Program |
{% comment %} Code adapted from https://codinfox.github.io/dev/2015/03/06/use-tags-and-categories-in-your-jekyll-based-github-pages/ {% endcomment %}
{% endcomment %}
{% assign programs = "" %} {% for grant in site.grants %} {% assign program = grant.funder | append: ' - ' %} {% if grant.program != nil %} {% assign program = program | append: grant.program | join:'|' | append:'|' %} {% else %} {% assign program = program | append: '(N/A)' | join:'|' | append:'|' %} {% endif %} {% unless programs contains program %} {% assign programs = programs | append:program %} {% endunless %} {% endfor %} {% assign programs = programs | split:'|' | sort %}
{% for program in programs %} {{ program }} {% endfor %}
{% endcomment %}
{% for program in programs %}
-
{% for grant in site.grants %}
{% assign myprogram = grant.funder | append: ' - ' %}
{% if grant.program != nil %}
{% assign myprogram = myprogram | append: grant.program %}
{% else %}
{% assign myprogram = myprogram | append: '(N/A)' %}
{% endif %}
{% if myprogram == program %}
- {{ grant.title }} {{ grant.author }}, {{ grant.year }}, {{ grant.status }} {% endif %} {% endfor %}