10393 Posts in 2203 Topics by 1714 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 890 Views |
-
Taming HasManyFileManager

19 February 2009 at 5:59am Last edited: 19 February 2009 6:01am
Hi all!
I'm working on a site where I want to include one to several images with each page. My idea is that the images should be displayed as thumbnails in a row, and when clicked a larger version of the clicked image should appear. I looked at the Gallery module, but it seemed a little too clumsy for what I have in mind.
At first glance the HasManyFileManager module seemed right for the job, and as far as the documentation goes it works like a charm. But I have no idea how to make it do anything more than that. The function $SetWidth() is mentioned, not nothing is said about what other functions are supported. But just being able to retrieve the URL of the image would take me far.
Any suggestions?
/MÃ¥ns
-
Re: Taming HasManyFileManager

19 February 2009 at 6:12am
Hi Mans
the has many file manager is simply a way to manage files attached to a page. You can use any of the usual functions/variables in the template as you would for any other images on the files which are attached to a page.
For example: $Image.SetWidth(150), $Image.SetHeight(150), $Image.CroppedImage(150,150) etc.
and for image info $Image.URL or $Image.Title etc.
The GD docs show the image resizing functions, but unfortunately it only shows the functions you can use in your PHP classes, not the (strangely) renamed ones for the template: http://doc.silverstripe.org/doku.php?id=gd
hope that helps
-
Re: Taming HasManyFileManager

19 February 2009 at 7:37am
The ImageDataObjectManager is more feature-rich and would do a better job than the HasManyFileManager. That will be ready in a few days.
| 890 Views | ||
|
Page:
1
|
Go to Top |


