<?php $this->requestAction('foo/bar'); ?>
would echo the foo/bar action to the output automatically so you don't
need to echo(print) it. And also because of that you are not able to
treat it like a string variable.

But if you use the function like this:
<?php echo $this->requestAction('foo/bar', array('return')); ?>
Then you can do this:
<?php echo 'foo'.$this->requestAction('foo/bar',
array('return')).'bar'; ?>

I hope it's clear.

half_brick yazdi:
> Just a heads up for any n00bs (I'm a recovering one myself)
> If you're using requestAction, it doesn't work in quite the same way as
> renderElement for example:
> echo '<div>'.$this->renderElement('foo', $params).'</div>';
> will spit the rendered element nicely into the div
> while:
> echo '<div>'.$requestAction('foo/bar').'</div>';
> will not.
> to make it work you must do:
> echo '<div>';
> echo $this->requestAction('foo/bar');
> echo '</div>';
>
> I wasted half an hour on this, just thought I'd try to save others the
> time.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to