Grav 2 + Admin2: custom page blueprint fields not showing in Admin

Hi everyone,

I’m currently testing my theme with Grav CMS 2 (dev) and the new Admin2 Plugin, and I’ve run into an issue with page blueprints.

In Grav 1.x, I define custom fields for pages via my theme’s blueprints (for example, additional options under the Page configuration, not the theme config), and they show up correctly in the Admin panel.

However, in Grav 2 + Admin2:

  • My custom page blueprint fields are not in the Admin UI
  • Only the default fields (title, content, media, taxonomy, etc.) are visible
  • It seems like my theme’s page-level blueprint extensions are being ignored

What I’m doing

In my theme, I define custom fields in page blueprints, something along the lines of:

form:
  fields:
    tabs:
      fields:
        content:
          type: tab
          fields:
            header.subtitle:
                type: text
                style: vertical
                label: FUTURE.ADMIN.ITEM.ITEM_SUBTITLE

These used to appear under the “Content” tab for each page in Grav 1.x.

Question

Has anything changed in Grav 2 / Admin2 regarding how page blueprints are:

  • Registered
  • Extended
  • Or merged from themes?

Do we now need to explicitly register or enable them somewhere for Admin2 to pick them up?

Or is there a new recommended way to inject custom page-level options from a theme?

Any guidance or documentation pointers would be greatly appreciated.
Thanks in advance!

I ran into this issue some time ago, and somehow the filename of the page got changed which resulted in the blueprint not being picked up - perhaps just double-check the right filename and matching blueprint filename are as expected?

I am using Admin2 with custom blueprints and do not remember doing any additional steps.

First of all, thank you for investing in the further development of our beloved CMS, Grav. I have installed Grav 2.0.0-rc.1 with the new default theme, Quark 2.
At this stage of development, I’m running into problems or am stuck:

  1. In the Quark 2 themes directory, I can’t find the Blueprints directory containing the YAML files for the corresponding templates (blog.yaml, item.yaml, etc.). Or are these no longer needed?
  2. I have created a blog page using the Blog template and three blog posts using the Item template. The three posts are not listed on the blog overview page. Furthermore, the Previous Post/Next Post buttons do not work.
  3. Previously, there was a button on every page that allowed you to create a (usually sub)page directly. I can’t find this button.

I really like the new layout in the admin area and would be grateful if anyone could help me out. → opened issue on github: Missing blueprints for Blog-Templates · Issue #3 · getgrav/grav-theme-quark2 · GitHub

Hi @idna - I am not sure of the stare of the unreleased Quark2 theme but it would be helpful if you could please add an issue about this to the repo about this issue : Issues · getgrav/grav-theme-quark2 · GitHub

I definitely don’t know what’s going on with my computer, because suddenly everything started working. I don’t know if it’s due to an update of the API plugins, Admin2, or something else, but in all themes I maintained everything seems to be working the same as in Grav 1.7.x.