I found the problem: I was trying to call the "updatecontent" template
from the "signon" view. Because I was not logged in yet, the "Auth"
component was not allowing the "updatecontent" template to be
displayed!!! That is 24 hours of my life I will never get back :-)
To fix the problem I added the "updatecontent" template to the Auth
"allow" list:
$this->Auth->allow('register', 'updatesites');
On Nov 23, 10:54 am, pkclarke <[EMAIL PROTECTED]> wrote:
> Thanks for your help Kyo. I've implemented your suggestions & also
> added the "render()" function (see below). However I must be missing
> something, as it is still not returning the content to the main
> template.
>
> Main Template (login.ctp):
> <--------------------
> <div id="testcontent">
> replace this
> </div>
>
> <?php
> echo $ajax->link('Click here', null, array('url' => 'updatecontent',
> 'update' => 'testcontent'));
> ?>
> -------------------->
>
> Main Controller (users_controller.php):
> <--------------------
> function updatecontent() {
> $this->layout='ajax';
> if ($this->RequestHandler->isAjax()) {
> $this->set('content', 'sample content');
> $this->render('updatecontent', 'ajax' );
> }}
>
> -------------------->
>
> Ajax content template (updatecontent.ctp):
> <--------------------
> <?php
> echo "content: ";
> echo $content;
> ?>
> -------------------->
>
> Again, thanks for any assistance in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---