Get current page params $this->params in cake php when an ajax request is passed from it
Is it possible to get base page params directly to ajax request function in cake php
For example
http://localhost/pages/view/2 is my base path.
I am requesting a ajax /pages/customFunction from base page.
Is it possible to get base page params as ‘pages’ , ‘view’ and 2 inside function customFunction() without passing through ajax ?
No it is not except you’re using the session to store the information there.
You’re making two https requests, one for the add and another one to customFunction. That’s how http works.
Simply pass the same params you have used for the add method to the custumFunction in the ajax request. I don’t see a problem to get this done.