Jump to content
berechar

Button Module for Updating Static Information

Recommended Posts

Hi all,

I would like to add a menu item the the 'setup' drop-down menu in the admin (eg. where 'Import Pages from CSV' ends up). This menu item should only function as a button: I would like to click it, run it's function(s), and return to the same page as where I was. I would use it to get some PW data, wrangle it, and save it. Because the information is very static and big, it doesn't have to be reguraly be updated, therefore, a button is enough.

Any help, pointers and how to's regarding to make such a module-button would be great.

Best,
Berechar

 

Share this post


Link to post
Share on other sites

Create a module of the "Process" type here: http://modules.pw/ 

In the ___execute() function you can do your work and after that use this to redirect wherever you need:

$this->session->redirect($url, false);

I'm just not sure how exactly you could get the previous location's url.

  • Like 1

Share this post


Link to post
Share on other sites

Server referer should work fine in most cases for the previous URL.

  • Like 1

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...