TwoWheelDev Posted November 16 Share Posted November 16 I'm in the process of developing a module, that will need to handle callbacks from the third-party API. The pages for the callback will need to be accessible from frontend without a login, what's the best way to handle this from a module. Is it possible to do without manually creating the pages... I guess some sort of registering a URL that processwire will send to the module to do the processing Link to comment Share on other sites More sharing options...
bernhard Posted November 16 Share Posted November 16 Have a look at URL hooks! https://processwire.com/blog/posts/pw-3.0.173/ Oh, and welcome to the forum 😉 1 Link to comment Share on other sites More sharing options...
TwoWheelDev Posted November 16 Author Share Posted November 16 Oh, that's awesome! Exactly what I was looking for! And thank you! Been registered here ages... but only just needed to actually post, such is the amount of awesome information already out there fro ProcessWire Link to comment Share on other sites More sharing options...
TwoWheelDev Posted 2 hours ago Author Share Posted 2 hours ago So I've got the URL Hooks working wonderfully! makes it really easy to create some custom logic to handle things At the moment, I'm using a mixture of urlSegments (for one route e.g. /shop) and urlHooks (for the backend json stuff at /api/<stuff here>). Is it possible to use the urlHooks to create a something similar to the urlSegments. I see in the documentation you can return a page, but is it possible to create the hooks function that would get a template and do the necessary before returning that to the user? I guess something similar to the way the an admin module can use views for the pages, and the function just pushes the data into that page. Hopefully that makes sense! 🤔 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