Extending Kirby instance inside a plugin


On the forum I stumbled on Using blueprints in new panel areas - General - Kirby (getkirby.com) with the recommendation to duplicate the site view and pass a new blueprint.

So, I’ve created a new plugin that replicate the site view but now I’m stuck with the blueprint part.

Site view data is part of App::instance(), right? So I need to add my own set of data (based on a blueprint) to the Kirby\CMS\App object and then retrieve the data with something like:

App::instance()->mydata(); #including panel and view


But how?

Thank in advance for your help

I’ve modified Kirby Core to fit my needs… I know, updating Kirby will be a nightmare but that’s the only way I found to quickly get the desired result and move forward.

Not a good idea.

You would better overwrite the Kirby (App) class: