I’m just learning the power of Grav with Blueprints (Wow!!!). I’ve customized page blueprints successfully, but I can’t create a blueprint of a module. A module for a modular page. I must be doing something wrong… The files are as follows:
What I want is to create a module with the name template assigned where the name.yaml form is displayed (I put the example gallery from the official documentation), but I still get the standard form.
I haven’t seen a section in the official documentation that deals with module blueprints, which would be something like the parts of a modular page, but there is already a folder called parts in the templates theme folder, so the concepts of page, modular page and module confuse me a bit here.
Can someone give me a hand? It may be something simple but I’ve been stuck for days!
your approach is correct. The file/directory structure is correct. So it may fail at another point. Maybe the yaml is malformed, you did’nt deliver an example. This is one of my blueprint of a module a google maps section in this case:
Something goes wrong because I’ve paste your code on the following paths (at same time)…
/user/themes/theme/blueprints/name.yaml
/user/themes/theme/blueprints/pages/name.yaml
/user/themes/theme/blueprints/modular/name.yaml
/user/themes/theme/blueprints/parts/name.yaml (just in case…)
… and I still get the standard form Discarding possible mistakes…
I assign as parent a modular page.
Every time I clean cache and refresh the browser (just in case…).
There are 5 items/modules assigned on the same modular page. The page displays smoothly with custom twig templates on each item and standard administration forms (here is where I’m blocked, the blueprints are lacking).
Custom blueprints from other standard pages work fine.
I have removed the final 4 dots from your example code (I think they are superfluous, but I wanted to try pasting the code in its entirety). Nothing…
Yes, but I found that this choice points to the twig template type, not the blueprint type. I deduced that when I deleted all the Blueprints and still saw the option to choose template “name”.
The home file is the modular page which can have it’s own blueprint. The google-maps file is a single module and have it’s own blueprint. The blueprint folder structure looks like this:
Yes, the file paths match in my installation. Anyway, tomorrow I will go over everything from scratch (once again). If it still fails, I can share a login and FTP account if anyone wants to take a look, since I’m working in a test environment. Maybe I have something misconfigured or maybe it’s a stupid oversight that should be forgotten over a few beers…
Just took these screenshots today, just upgraded to Grav v1.7.36 - Admin v1.10.36
I still don’t know how to run a Blueprint for a module, and I can’t find information in the official documentation specific to Blueprints for modules.
I have done the same operation (and multiple variants) with a Blueprint from scratch (without the extends, type and context attributes), to rule out misuse of them.
Surely there are no parameters in the configuration or other details to go over to make sure I’m doing everything right? I need to think so in order not to believe in digital poltergeist .
Grav skips blueprints inside the theme/blueprints/modular folder as long as the theme/blueprints/pages folder exists, even if this folder is empty.
The Grav documentation explains different paths for page blueprints. On the one hand in theme/blueprints and on the other hand in theme/blueprints/pages. The blueprint paths for modules (theme/modular or theme/pages/modular) are not explained, you have to deduce them by going through the Grav themes.
I thought I could organize the blueprints in theme/blueprints/pages for pages and theme/blueprints/modular for modules, but this is incompatible.
Maybe it was a confusion when translating the text?