$html is a view helper.
WHY do you need to create a hyperlink in the controller?
On Jan 23, 7: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
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).
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
The simplest way to get a url is using the Router.
Like that:
$url = Router::url('/controller/action', true);
/**
* Finds URL for specified action.
*
* Returns an URL pointing to a combination of controller and action. Param
* $url can be:
*+ Empty - the method will find adress to
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