Clarity Posted October 18, 2023 Share Posted October 18, 2023 Hello everyone! Can you please tell me how to delete a template from database via API? Link to comment Share on other sites More sharing options...
Clarity Posted October 18, 2023 Author Share Posted October 18, 2023 Found it: https://processwire.com/api/ref/templates/delete/. For example, wire()->templates->delete(wire()->templates->get('basic-page')); Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted October 19, 2023 Share Posted October 19, 2023 If you are willing to use Rock Migrations 3rd party module, it has a special method for that. 1 Link to comment Share on other sites More sharing options...
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