Hello, one Question Exist a Addon to Create Buttons in Singeltons, to Start a Get or Post Request for the Curl of a Page ? Like the Webhooks internal but, you can Start it.
On the Time i made this over the Clear Cache Button in Settings, it’s the Same i will clean the Generate Staticpages in my PHP Frontend.
Thanks for your Help
@fschuermeyer, you can’t (at least directly), but if what you want is to trigger an external action, you can use the following approach:
- Create a singleton named releases (you don’t need any fields but you can have a title and description)
- Implement a
singleton.saveData.after.releases hook and inside it do the curl request you need (this hook is triggered every time the singleton releases is saved)
I faced similar situation for Netlify and ended up by implementing a custom addon - https://github.com/pauloamgomes/CockpitCMS-Netlify
i create now a “Command line” with differnet Commands to do this over the action hook
And i change the form from Singeltons if the Name from Singelton is Command Line
This works very Good