Hi,
I have a plugin and it does a ajax call to a Controller inside of my plugin, it's is correct, but, when I show the result of the content, it's does not appear.
in my controller a have:
public function form(){
Configure::write('debug', 0);
$this->layout = 'ajax';
$var = '123';
$this->set('data', $var);
}
and i have a View/Layouts/ajax.ctp with
<?php echo $this->fetch('content'); ?>
Ps.: I've only this code in my ajax.ctp layout (and some comments)
and this is my View/[pluginControllerName]/form.ctp
<form>
<input type="text"/>
<input type="button" value="ok"/>
<br/>
<?php echo $data ?>
</form>
so, the result is:
Amigos adicionados:
the $data value, not appears, someone know what's up?
Ps.: in my test the value of $data is a constant
It's like if $this->fetch('content'); not working or $data value is empty
-- You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
No comments:
Post a Comment