Skip to content
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

Feature/allow plugins hook in admin #148

Merged
merged 2 commits into from
Sep 7, 2015

Conversation

flaviocopes
Copy link
Contributor

Adds

  1. the possibility for a plugin to provide pages to be used by the admin plugin

  2. the ability to hook in the nav menu with the onAdminTemplateNavPluginHook event.

Example usage:

    public function onAdminTemplateNavPluginHook()
    {
        $this->grav['twig']->plugins_hooked_nav['PLUGIN_DATA.DATA'] = ['route' => 'data', 'icon' => 'fa-file-text'];
    }

…opulate plugins_hooked_nav

Example event handling:

    public function onAdminTemplateNavPluginHook()
    {
        $this->grav['twig']->plugins_hooked_nav['PLUGIN_DATA.DATA'] =
['route' => 'data', 'icon' => 'fa-file-text'];
    }
@flaviocopes
Copy link
Contributor Author

Refs #146

rhukster added a commit that referenced this pull request Sep 7, 2015
@rhukster rhukster merged commit 2beee90 into develop Sep 7, 2015
@flaviocopes flaviocopes deleted the feature/allow-plugins-hook-in-admin branch September 16, 2015 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants