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 →

Import blueprint form field names

Started by Paul 9 years ago · 2 replies · 1441 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 Anna, 2 days ago
2 53 16 hours ago
Forms & Blueprints · by Anna, 3 days ago
7 82 16 hours ago
Forms & Blueprints · by Anna, 1 week ago
5 186 6 days ago
Forms & Blueprints · by TomW, 1 month ago
3 379 1 month ago
Forms & Blueprints · by Japhy, 2 months ago
2 595 2 months ago