hellomoto Posted September 25, 2016 Posted September 25, 2016 I want to write a quick little module that regenerate all images in /site/assets/files/ on request. I figure I'll just have a button on the module configuration page to run the script. So do I start it out like so?: class ImgRegen extends WireData implements Module {} singular=true, autoload=false. Sound right so far? Then how do I add this button to the config page to run the script? Need I make it a native PW field, since it doesn't store any data? Thank you all
Robin S Posted September 25, 2016 Posted September 25, 2016 A good way would be to use a checkbox in conjunction with the normal form submit button. Then look for my_checkbox=1 in the post data. Have a look at how the PageimageRemoveVariations module by @horst does it.
teppo Posted October 17, 2016 Posted October 17, 2016 This topic has just been moved to Module/Plugin Development subforum. Please post any questions about module development here, the main Modules/Plugins area is mainly dedicated to module support threads. Thanks!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now