[ckan-dev] conditional template

Matthew Fullerton matt.fullerton at gmail.com
Tue Nov 10 13:52:03 UTC 2015


You need to create a new additional_info.html and then include the bits
from the stock additional_info.html where you need them. Something like
this:

{% ckan_extends %}

(All blocks that you don't want to change will be included)

{% block change_sometimes %}
{% if condition == something %}
my new template code
{% else %}
paste code from
https://github.com/ckan/ckan/blob/master/ckan/templates/package/snippets/additional_info.html
as required
{% endif %}

On 13 October 2015 at 16:11, Marek Šplíchal <marek.splichal at gmail.com>
wrote:

> Hi,
> i wrote new theme in which i need to extend template additional_info.html
> for datasets harvested with my harverster, but for other datasets i need to
> use original additional_info.html.
> Can someone help me, please?
>
> Marek Splichal
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20151110/8b08cc41/attachment-0002.html>


More information about the ckan-dev mailing list