Skip to content
Grav 2.0 is officially stable. Read the announcement →
Forms & Blueprints

Import blueprint form field names

Started by Paul 9 years ago · 2 replies · 940 views
9 years ago

I want to re-use a blueprint for multiple fields, but the docs only give an example for a named field.

import@: for blueprints is described in the docs with this form definition:

YAML
form:
  fields:
    gallery.images:
      type: list
      label: Images
      fields:
        .src:
          type: text
          label: Image

and use like so

YAML
form:
  fields:
    images:
        type: section
        title: Images
        underline: true
        import@:
          type: partials/gallery
          context: blueprints://

this will write a list to gallery.images in the markdown. But what if I want to re-use partials/gallery for another gallery? e.g. gallery2.images

9 years ago

I don't think this is currently supported. It's getting a bit fiddly when you want to reuse things at that micro-scale.

9 years ago

I'm trying to reproduce my template, which is built from reusable partials, in blueprint. So far I have had to be very redundant in the blueprint.

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 5 years ago
13 1558 5 months ago
Forms & Blueprints · by Hugo Oliveira, 6 months ago
0 272 6 months ago
Forms & Blueprints · by Flachy Joe, 8 months ago
9 376 7 months ago
Forms & Blueprints · by Augustus, 8 months ago
7 375 8 months ago
Forms & Blueprints · by Julien, 8 months ago
10 406 8 months ago