$this->Html->image($this->Html->url(..., TRUE));
the TRUE forms the url into a "http://...."; address
this can then by used as url for the image - voila


On 17 Sep., 09:21, AD7six <[email protected]> wrote:
> On Sep 17, 4:22 am, "j.blotus" <[email protected]> wrote:
>
>
>
>
>
> > I want to make sure HtmlHelper outputs a full path image eg:
>
> > currently:
>
> > echo $this->Html->image('myimage.gif')
>
> > becomes
>
> > <img src="../img/myimage.gif" />
>
> > i would like to do this:
>
> > echo $this->Html->image('myimage.gif', array('full' => true))
>
> > to get this output:
>
> > <img src="http://www.myurl.com/img/myimage.gif"; />
>
> > Am I missing something that already exists? I know I could just put
> > the full base url in as the image file name, but sometimes I use
> > different domains for the same image file e.g. logo.png
>
> To achieve that, override the webroot function in your app helper:
>
> http://github.com/cakephp/cakephp/blob/master/cake/libs/view/helper.p...
>
> such that it returns, e.g. "http://example.com"; . parent::webroot();
>
> hth,
>
> AD
>
>
>
>
>
> > Thanks guys

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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