Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Problem adding mutiple images to page


Reply

13 Posts   2199 Views

Avatar
Craftnet

8 February 2013 at 12:08am Community Member, 58 Posts

If I understand correctly...

You can write own function
http://doc.silverstripe.org/framework/en/reference/image
Just put it in the Controller

Sorry for my bad English

Avatar
mimamo

8 February 2013 at 2:10am Community Member, 22 Posts

But normaly i have to define a variable in the page.php or object.php and with this variable i can get the saved content to the templates.
I mean which is the variable here to get the Images?
I don't want to use $SetWidth(xx) i want the image wit its original size.

and even if I write a function. I stil have to put a variable inside?!

or?

Avatar
Craftnet

8 February 2013 at 2:22am Community Member, 58 Posts

Sorry, I misunderstood :)

I think that the best solution would be to use this form:

<img src="$URL" />

then you will have the original size

Sorry for my bad English

Avatar
mimamo

8 February 2013 at 2:33am (Last edited: 8 February 2013 2:33am), Community Member, 22 Posts

Thx a lot! :)

And your english is not more worse than mine ;)

Avatar
octopuscreative

19 September 2014 at 6:27pm Community Member, 10 Posts

Great share by svandragt. If you're using Silverstripe 3 this works perfectly, adds multiple images and gives you the flexibility to structure the template page appropriately. Perfect!