-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grav 1.7 Migration Blueprints #859
Comments
The docs talk only plugin/theme blueprint, not other blueprints. Slug and type was added for GPM not to have to guess if your extension is a plugin or a theme. Nothing else has been changed. I take a deeper look into this when I am looking into documentation. |
Why is it required to add a slug? Can't grav just parse the folder name itself? this looks duplicated to me. What about the second question? |
Yes, Grav does use the folder name, but check all the zip files -- there's no good way to figure out the name when you're installing the plugins/themes. This has caused some issues during installation. |
Alright, that is clear now. Could you please explain the different between |
I guess one is for getting blueprints and another is for twig files. Both methods are from the time before streams. Getting the templates is still relevant as you're not required to define blueprints to have a custom looks. But blueprints should generally be using streams instead. |
https://learn.getgrav.org/17/advanced/grav-development/grav-17-upgrade-guide#plugin-theme-blueprints-blueprints-yaml
Could that get clarified, please? What is the slug used for? What about page blueprints or partials? What type should I use in the following usecases:
Second question
https://learn.getgrav.org/17/advanced/grav-development/grav-17-upgrade-guide#blueprints
Do we still need the event code? I am using the event code from here:
https://learn.getgrav.org/16/admin-panel/extending#adding-a-custom-page-blueprint-to-a-theme-plugin
However I was always wondering why there are 2 more docs with different examples:
https://learn.getgrav.org/16/forms/blueprints/example-page-blueprint#in-a-plugin
https://learn.getgrav.org/16/plugins/event-hooks#ongetpagetemplates
Maybe those examples should also get updated?
onGetPageTemplates
even required? It does not seem to in my usecase, I might be wrong.getSubscribedEvents
should be replaced byonPluginsInitialized
and anisAdmin
check, correct?onGetPageTemplates
andonGetPageBlueprints
. Are those outdated or what is this code used for? I am completely confused hereThe text was updated successfully, but these errors were encountered: