A blueprint to develop your own extensions.
This code showcases the available possibilities for extension developers. This is not an extension that attempts anything useful for the user. It is merely intended as an example for developers to copy and paste. We have tried to write extensive comments in the code. Pull requests for improvements are always appreciated.
Basically, you can use this extension in 3 different ways:
- To use this extension as a starting point for your own package, copy it into your vendor folder inside the packages directory, i.e. from
packages/your-vendor/my-extension(details in the documentation). From the code that you now have, you can remove anything that you do not need.
- Create an extension from scratch and just copy and paste any snippets you want.
- Just browse this code to understand how developing for Pagekit works.
When you get started with extension development, make sure to also read the Extension Guide in the Pagekit documentation.
This extension showcases a variety of things you can do with an extension inside Pagekit. Some of these are:
- Register a controller to a static route
- Register a controller to a dynamic node for the Site Tree
- Add a menu item to the admin interface
- Create a settings screen
- Work with module configuration
- Create a Vue component
- Work with permissions
- Run install, uninstall and update scripts: