roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave <snoopd...@gmail.com>
Subject Re: $url Media Files 5.0.0-RC2
Date Fri, 24 Sep 2010 20:57:28 GMT
On Tue, Sep 21, 2010 at 4:15 PM, ├Žon <aeon.lancer@gmail.com> wrote:
> How do I get the URL of a file uploaded to "Media Files" with Velocity?
>
> with Roller 3.01 is "$url.resource(filename)"
> but with Roller 5.0.0-RC2 I don't know how.

Yes, that is a disadvantage of Roller 5's image handling: you have to
copy the image URL from the image information page. The advantage is
that if you move images around in the directory structure, the URLs
all stay the same and you won't break image tags. So...

Any images that existed before your Roller 5 upgrade will still work
with $url.resource(filePath). Like so:

   <img src='$url.resource("/foo/bar.img") />

But new images that you upload you will have to refer to by URL. To
get an images URL, go to the Media File Manager page, select your
image and then copy the Link (URL) from the page. Like so:

   <img src='http://example.org/roller/mediaresource/0da9a18c-217c-46b8-94cb-7f2343133cbc"
/>

Hope that helps.

- Dave

Mime
View raw message