Hi Dordo,

You are right that the ajax->link method does not echo the result, but
if you put it within a custom helper method it does. Not sure why but
I just took it out of the helper and put it directly in the view and
it has worked. I will try and work out why it doesn't work in the
helper when I have some more time.

Thanks for the help it just kicked some wheels in my brain in to
gear :)

Cheers

Mike

On Dec 4, 5:49 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> If you look at it:http://api.cakephp.org/1.2/ajax_8php-source.html,
> the link method returns the output, it doesn't print.
>
> On Dec 4, 2007 1:37 PM, Mike Digital Egg <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
> > I need to take some output from a helper and put it into a variable
> > rather than echoing it to screen, is this possible with Cake 1.2?
>
> > eg.
> > Helper Function: links.php
> > [code]
> >         function return_link() {
> >                 $output = $this->Ajax->link(__('return_link',true),'/
> > index',array('update' => 'pagecontent','loading' =>
> > "loading();showMenu();",'complete' => "complete();"),null,false);
> >                 return $output;
> >         }
> > [/code]
> > Page View
> > [code]
> > <?php $return_link = $links->return_link(); ?>
> > [/code]
>
> > Doing this prints the link to screen (which I don't want it to do).
>
> > Any ideas?
>
> > Cheers
>
> > Mike
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to