mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-04 20:36:03 +01:00
taxonomy field type that lists input fields for every defined taxonomy [fix #53]
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
{% set taxonomies = (taxonomies is null ? admin.data('site').taxonomies : taxonomies) %}
|
||||
{% set parentname = field.name %}
|
||||
{% for name in taxonomies %}
|
||||
|
||||
{% set field = {
|
||||
type: 'text',
|
||||
classes: 'fancy',
|
||||
label: name|capitalize,
|
||||
name: parentname ~ '.' ~ name
|
||||
} %}
|
||||
{% set value = data.value('header.taxonomy.' ~ name) %}
|
||||
|
||||
{% include ['forms/fields/text/text.html.twig'] %}
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user