[ckan-dev] Displaying custom tags
Koebrick, Andrew (MNIT)
andrew.koebrick at state.mn.us
Thu Jun 11 18:35:20 UTC 2015
I guess I should have mulled this over a bit on my own before writing to the list, since I have found a few solutions via the jinja2 templating engine. I am sending them out in case other novices bump into the same problem. But please let me know if there is an even better way to do it (perhaps a helper function?)
My solution:
<tr>
<th scope="row" class="dataset-label">{{ _("Projection") }}</th>
<td class="dataset-details">{{ pkg_dict.projection|join(', ') }}</td>
</tr>
Or done as a bulleted list:
<tr>
<th scope="row" class="dataset-label">{{ _("Projection") }}</th>
<td class="dataset-details">
<ul>
{% for p in pkg_dict.projection %}
<li>{{p}}</li>
{% endfor %}
</ul>
</td>
</tr>
Thanks for any additional ideas.
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20150611/9f499352/attachment-0003.html>
More information about the ckan-dev
mailing list