Skip to content

Conversation

@Skitionek
Copy link

Use _expanded_schema fields when rendering group template.
Without the change presets were not loaded therefore wrong display_snippets were rendered.

Without the change presets were not loaded therefore wrong display_snippets were rendered.
@Skitionek
Copy link
Author

Workaround:
Overwrite templates to replace c.scheming_fields ref with h.scheming_get_organization_schema(group_type)['fields'].

ckanext/scheming/templates/scheming/organization/about.html

{% extends "organization/about.html" %}

{% if group_dict is not defined%}
    {% set group_dict = c.group_dict %}
{% endif %}

{% block primary_content_inner %}
<dl>
+ {%- set scheming_fields = h.scheming_get_organization_schema(group_type)['fields'] -%}
+ {% for f in scheming_fields %}
- {% for f in c.scheming_fields %}
<dt>{{ h.scheming_language_text(f.label) }}:</dt>
<dd>{{ group_dict[f.field_name] or ("&nbsp;"|safe) }}</dd>
{% endfor %}
</dl>
{% endblock %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant