Based on your syntax, I think you want HtmlHelper::link() (makes a
hyperlink), not Html::url() [just makes a proper url].

If you do need just the url then you can do this:
$this->set('myurl', Router::url('/controller/action/'));

(HtmlHelper::url() just calls Router::url() under the hood anyway).

If, for some really weird reason, you DO need to use
HtmlHelper::link() in the controller, then use WebSpin.biz's
suggestion. Just get the function name right!

(Although I'd really like to know WHY you think you need to use a
helper from a controller. I can't think of any situation where this
might be necessary, although it's conceivable that there is one.)

On Jan 23, 11:18 am, "WebSpin.Biz" <[EMAIL PROTECTED]> wrote:
> First, you'll have to load the helper into your controller (has to be
> a really good reason why you would want to do this)
>
> App::import('Helper', 'HtmlHelper');
>
> Then, make sure AUTO_OUTPUT is set to false in your core config file
> (/app/config/core.php), then, capture the output of the helper, and
> set it into the view
>
> $this->set('myurllink', $html->url('Linkname','/controller/
> fun_name/'));
>
> Raphael Spindellhttp://www.webspin.biz
>
> On Jan 23, 2:18 am, "jenson" <[EMAIL PROTECTED]> wrote:
>
> > Hi Guys ,
> > I have  to assign $html->url('Linkname','/controller/fun_name/'); in 
> > controller page  not
> > in thtml page. plz help me regarding this as early as possible...
>
> > with regards ,
> > jenson.
>
> > --
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to