Re: Fatal error Call to undefined method Controller Html()
$html->link('Activate account', $html- >url(array('controller'=>'users', 'action' => 'activate', $userid), true)); Works like a charm indeed Cheers ! On Oct 31, 6:41 pm, Rafael Bandeira aka rafael --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Fatal error Call to undefined method Controller Html()
> link('Activate account', > array('controller'=>'users', 'action' => 'activate', $userid); ?> ^ it's missing a close bracket here -^ anyway: > Is there a way the above can be used to print out an absolute url ? $html->link('Activate account', $html- >url(array('controller'=>'users', 'action' => 'activate', $userid), true)); or $html->link('Activate account', Helper::url(array('controller'=>'users', 'action' => 'activate', $userid), true)); or $html->link('Activate account', Router::url(array('controller'=>'users', 'action' => 'activate', $userid), true)); -the boring explanation: you can use Router::url/Helper::url passing true as the second param to get the full route out of the url you passed in the first param. in case you ever extend Helper::url on AppHelper, use $html->url() to use the overrided method. LAST BUT CERTAINLY NOT LEAST, CakePHP has documentation and API specifications that cover this feature, please refer to http://api.cakephp.org and http://manual.cakephp.org as often as possible to get in touch with all the features, power and might and magic of CakePHP. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Fatal error Call to undefined method Controller Html()
Try putting 'full_base' => true to your url array. I haven't tried this myself, but if I'm reading the source right, it should work. Hope that helps! On Oct 31, 2:21 pm, Malcolm Krugger <[EMAIL PROTECTED]> wrote: > link('Activate account', > array('controller'=>'users', 'action' => 'activate', $userid); ?> > > The above works perfect except the fact that it is not the absolute > URL > > $userid by the way is a raw parameter which I want to pass to an > action > > Is there a way the above can be used to print out an absolute url ? > > Thanks again --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Fatal error Call to undefined method Controller Html()
link('Activate account', array('controller'=>'users', 'action' => 'activate', $userid); ?> The above works perfect except the fact that it is not the absolute URL $userid by the way is a raw parameter which I want to pass to an action Is there a way the above can be used to print out an absolute url ? Thanks again --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Fatal error Call to undefined method Controller Html()
Perfect Yes I have a component called Captcha Oh silly me ! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Fatal error Call to undefined method Controller Html()
Helpers are not meant to be used in a controller, they are used in your views/layouts/elements. Could it be that you also have a component called Captcha? If you do, that's the reason why $this->Captcha->show(); doesn't crash, but $this- >Html('title' , ''); does. On Oct 31, 1:15 pm, Malcolm Krugger <[EMAIL PROTECTED]> wrote: > I have this > > var $helpers = array('Html', 'Form', 'Captcha'); > > and now when I use > > $this->Captcha->show(); IT works perfectly..No issues there > > but when I use something like > > $this->Html('title' , ''); > > The error given is > > Fatal error: Call to undefined method UsersController::Html() > > So what could be causing this error ? > > Any help would be greatly appreciated --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Fatal error Call to undefined method Controller Html()
I have this var $helpers = array('Html', 'Form', 'Captcha'); and now when I use $this->Captcha->show(); IT works perfectly..No issues there but when I use something like $this->Html('title' , ''); The error given is Fatal error: Call to undefined method UsersController::Html() So what could be causing this error ? Any help would be greatly appreciated --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---