2015-05-19 49 views
0

我在文档中按照这些步骤(http://docs.ckan.org/en/latest/extensions/adding-custom-fields.html)在数据集来源中添加了额外的字段。CKAN - 在输入值和更新数据集表单后,附加字段不会显示在附加信息中

我能够获得额外的领域显示在数据集表单的“管理”页面。但是,在输入额外字段的值并更新数据集表单后,额外字段不会显示在摘要页面中...

任何人都知道如何解决此问题?非常感谢 !

回答

1

您必须更新您提到的教程的CKAN模板follow the instructions

E.g.在package/snippets/additional_info.html中加入:

{% ckan_extends %} 

{% block extras %} 
    {% if pkg_dict.custom_text %} 
    <tr> 
     <th scope="row" class="dataset-label">{{ _("Custom Text") }}</th> 
     <td class="dataset-details">{{ pkg_dict.custom_text }}</td> 
    </tr> 
    {% endif %} 
{% endblock %}