Override nested extended blueprints

#1

Im trying to override a field group that is in a tab that is itself also extended. Im trying to override the “slides” blueprint to add a query to it get images from some other pages, but its ignoring anything after extends: slides. Is it possible to do this?

  # HERO
  hero:
    extends:                     tabs/hero
    columns:
      left:
        width:                   2/3
        sections:
          herocontent:
            type:                fields
            fields:
              slideshero:
                extends:         slides
                heroslidesfield:
                  options:       query
                  query:         site.children.listed
0 Likes

#2

Not sure if that works, but looks like the path is missing?

slideshero:
  extends: fields/slides

And what is the slides blueprint, a group of fields?

0 Likes

#3

Its not missing, the slides field group is in a plugin:

'blueprints' => [
  // HERO FIELDS
  'slides'       => __DIR__ . '/blueprints/fields/slides.yml',
]

And yes, slides.yml looks like this, its just a field group:

type:                group
fields:
  heroslidesfield:
    label:           Hero Slides
    type:            files
    layout:          cards
    width:           3/4
    options:         query
    query:           page.images
    image:
      cover:         true
      ratio:         16/9
    size:            tiny
    when:
      herotype:      slides
  showslidecaptions:
    label:           Show Slide Captions?
    type:            toggle
    width:           1/4
    when:
      herotype:      slides

I got it to work but it looks like you need to redeclare the extend with another group, and put the changes in there:

  # HERO
  hero:
    extends:                     tabs/hero
    columns:
      left:
        width:                   2/3
        sections:
          herocontent:
            type:                fields
            fields:
              herotypeheading:
                label:           Hero Type
                type:            headline
              slideshero:
                extends:         fields/homeslides
0 Likes