Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

How to correctly override taxonomy category field in admin?

Started by Alexander Kim 9 years ago · 2 replies · 987 views
9 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.

9 years ago

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

9 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 themetman, 23 hours ago
2 39 16 hours ago
General · by Hanns Mattes, 1 week ago
0 119 1 week ago
General · by Karmalakas, 1 week ago
2 184 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 234 3 weeks ago
General · by Dima, 4 weeks ago
1 210 4 weeks ago