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!