Created
October 10, 2013 02:12
-
-
Save joshuapaling/6911950 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// put this code in app/View/Layouts/ajax.ctp | |
echo $this->fetch('content'); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// if the request is via ajax, then render an Element, containing just the little bit of the page you want to update. | |
if ($this->request->is('ajax')) { | |
$this->render('/Elements/my_element'); | |
return; // return the form only | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment