i need to call a cakePHP element in an Ajax function; when the user clicks an item want to populate a DIV with the content of an element.
The problem is that i don’t know how to properly create that element because i call the url but cakephp renders all the webpage instead of only the element.
How can i call only the element through a controller action?
Thanks in advance
c.
Try calling an action, but within it, specify:
That makes it so it does not use a layout file.
Then, within the view of that action, just echo the element – nothing else: