      {{/* if $a is a url, resources.Get may cause issues */}}
                {{ if resources.Get $a }}
                    {{ $a = (resources.Get $a).RelPermalink }}
                {{ end }}
            {{ end }}

            {{ $display := "block"}}
            {{ if gt $num 8 }} {{ $display = "none"}} {{ end }}
            <div class="pure-u-1-{{ $num_per_row }}" style="display: {{$display}};">
                <div class="add-padding">
                    {{ if and (eq $num 8) (gt (len $pic_set) 9) }}
