Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

How to correctly override taxonomy category field in admin?

Started by Alexander Kim 8 years ago · 2 replies · 777 views
8 years ago

Created blueprint under: "themes/MYTHEME/blueprints/single-news.yaml"

YAML
title: News
'@extends':
    type: default
    context: blueprints://pages

form:
  fields:
    tabs:
      type: tabs
      active: 1

      fields:

        options:
          type: tab

          fields:

            taxonomies:

              fields:

                header.taxonomy.category:
                  validate:
                    required: true

It doesn't work. I also checked admin plugin repo source codes and couldn't find anything regards on how the fields are named in yaml, in order to override/extend them.

8 years ago

you can check for original blueprints in system/src/blueprints

8 years ago

@paul:
you can check for original blueprints in system/src/blueprints

Ok, found it:

YAML
            taxonomies:
              type: section
              title: PLUGIN_ADMIN.TAXONOMIES
              underline: true

              fields:
                header.taxonomy:
                  type: taxonomy
                  label: PLUGIN_ADMIN.TAXONOMY
                  multiple: true
                  validate:
                    type: array

What's the correct way to override in my blueprint? Just copy everything and add my validation?

Suggested topics

Topic Participants Replies Views Activity
General · by jeremycherfas, 4 days ago
3 92 10 minutes ago
General · by Old Man Umby, 2 days ago
1 60 2 days ago
General · by Sebastian, 4 days ago
1 81 4 days ago
General · by Andy Miller, 2 weeks ago
0 216 2 weeks ago
General · by ready-4-IT, 6 months ago
1 716 3 weeks ago