Monday, May 21, 2012

jQuery append, how to get file content

Hi, CakePHP newbie here. 

I'm trying to append the content from one of the view file (page.ctp) into another view file (index.ctp). So basically what I'm trying to do is:
content from page.ctp ----> index.ctp

I managed to get the content of page.ctp using below method.

  1. $.get('http://localhost/pages/10', function(data) {
  2. console.log(data);
  3. });

But based on console.log(data) instead of getting the content of page.ctp, I got the whole page.ctp + default layout. What I'm trying to do now is to get the content of page.ctp only excluding other default layout file. 

Hope someone can help me with this. Thank you. 

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate