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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Forms & Blueprints

Modular blueprints only work sometimes

form

Solved by pamtbaau View solution

Started by Gabe Casalett 5 years ago · 3 replies · 518 views
5 years ago

Hello! I'm creating a theme for a one-page site, and using a modular approach. I've been able to successfully create blueprints for two of the modules, but the blueprints are not working for the other 4. All the modules are set up exactly the same, and I've been trying to use the blueprint examples from the documentation (https://learn.getgrav.org/17/forms/blueprints/example-page-blueprint), which worked for the first two pages.

I don't understand why it works for two of them but not the rest. I'm at my wit's end. Any help would be appreciated.

The yaml:

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

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

      fields:
        gallery:
          type: tab
          title: Gallery

          fields:
            header.an_example_text_field:
              type: text
              label: Add a number
              default: 5
              validate:
                required: true
                type: int

            header.an_example_select_box:
              type: select
              label: Select one of the following
              default: one
              options:
                one: One
                two: Two
                three: Three

File structure:
Screen Shot 2021-10-11 at 8.15.45 AM|192x500

5 years ago Solution

@gcasalett,

but the blueprints are not working for the other 4

"not working" is bit vague to test...

Anyway, you may try $ bin/grav cache. It does miracles sometimes.

5 years ago

Good point on the vagueness... the changes on the blueprints were not reflected on the admin page.

But clearing the cache worked! Been spinning my wheels for a couple of hours. Thank you so much!

5 years ago

@gcasalett, Add $ bin/grav cache to your toolbelt and use it whenever changes do not show up.

👍 1

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 5 years ago
13 1136 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 61 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 134 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 110 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 129 7 months ago