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.

Archive

Extend custom page blueprint

Started by Muut Archive 9 years ago · 2 replies · 905 views
9 years ago

I have created a theme with custom blueprints to configure options to be shown in the Admin. This part works fine.
The problem is that I am unable to extend these blueprints. When I try to define a common blueprint and use it on multiple pages (these are root pages), I get this error:

"Argument 1 passed to Grav\Common\Page\Page::move() must be an instance of Grav\Common\Page\Page, null given, called in /vagrant/acade.local/public/user/plugins/admin/classes/admincontroller .php on line 498"

I have seen this post, but I still don't get how to set this supposed missing variable:
https://getgrav.org/forum#!/getgrav/theme-development:error-while-using-a-custom

9 years ago

Edit: Sorry, actually the problem is not the inheritance, but simply modular blueprints.

9 years ago

Ok I think I've figured it out, I added this hidden input to the modular blueprint:

route:
type: hidden
default: '/'

I don't know if it is the best solution, but it works.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1280 9 years ago
Archive · by Muut Archive, 9 years ago
2 888 9 years ago
Archive · by Muut Archive, 9 years ago
2 4017 9 years ago
Archive · by Muut Archive, 9 years ago
1 2892 9 years ago
Archive · by Muut Archive, 9 years ago
3 1077 9 years ago