Ivan Gretsky Posted March 7, 2023 Share Posted March 7, 2023 Good day! I am in the need to disable autoloading of a certain module on certain condition. I am looking for a way to do it via API probably in a hook. Please suggest how to do it or is it even possible. Link to comment Share on other sites More sharing options...
bernhard Posted March 7, 2023 Share Posted March 7, 2023 You can provide a selector or a callback as "autoload" property of your module config: https://processwire.com/talk/topic/3768-processwire-dev-branch/#comment-36787 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted March 7, 2023 Author Share Posted March 7, 2023 Thanks, @bernhard! That was also the 1st thing that came to mind. But I need to cancel autoloading of 3rd party modules, I cannot modify. And I need to have this conditional disabling to happen in another module, not the one that is being disabled. Link to comment Share on other sites More sharing options...
bernhard Posted March 8, 2023 Share Posted March 8, 2023 Ah, that's a different question then ? You can look into TracyDebugger's module disabler feature then. There might be some helpful snippets? 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