3063 Posts in 864 Topics by 646 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 947 Views |
-
grabbing logos from URL and adding with imagefield?

7 April 2011 at 10:35pm Last edited: 7 April 2011 10:38pm
hi
I have a dataobject with this relation:
static $has_one = array(
'logo' => 'Image',
);So with this I can add a logo in the backend ...
In my case I would download the logo from an other site an upload it on my site ...But how it's possible to add a logo automaticly if I know the URL to the image -> dowload the logo and add it with imagefield?
I think it's easyier to not use an imagefield in this case and just link to the logo URL, right?
thx
-
Re: grabbing logos from URL and adding with imagefield?

7 April 2011 at 10:48pm
weeelllll - you can always just insert HTML into your content to do the sort of thing you are asking.
the real benifit of uploading it to silverstripe assest (which is what that does) is that the image can be manipulated (into thumbnail, or cropped, etc) and is then stored in resampled (a "cache") which greatly speeds up page load - at the same time as giving your users more "simple" control over these things. A nice thing of SS3 I am looking forward to is versioned assests - out of the box - but it'll only be with using the technology not taking "shortcuts".
| 947 Views | ||
|
Page:
1
|
Go to Top |


