Jump to content

add a shortcut to the module's setting inside /admin/setup/


fruid
 Share

Recommended Posts

maybe I made myself not too clear or I'm not getting something very basic. I want to have a link inside the /admin/setup/ dropdown menu that brings me to my modules settings page.

My module extends class WireData implements Module, ConfigurableModule, so the settings of the module are defined in an array of different fields in a separate php file outside the module's class. If I click on the module or on "Settings" just where the module is in the modules list, it brings me right where I want to be. I just want this page easier accessible. 

Link to comment
Share on other sites

Yes, just create an admin page like shown in the link I posted above and in the add this method to your ProcessModule:

<?php
public function execute() {
  $this->wire->session->redirect('urlofyourmoduleconfig');
}

So if someone clicks on the link in the menu pw will execute the execute() method which will cause the redirect to your destination.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...