Jump to:

3447 Posts in 1032 Topics by 872 members

Template Questions

SilverStripe Forums » Template Questions » resize by ratio?

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

Page: 1
Go to End
Author Topic: 1249 Views
  • janulka
    Community Member
    80 Posts

    resize by ratio? Link to this post


    In my template I would like to use image which will be resized by ratio, and I need to use "control" method to to that..

    <% control ResizedImage(150,150) %> - will resize image, skews if necessary
    <% control CroppedImage(150,150) %> - crops image

    what is the code for this to do resizing by ratio?

    thanks a lot in advance!

  • baba-papa
    Community Member
    279 Posts

    Re: resize by ratio? Link to this post

    I presume that your images have a 1:1 relation to an object.

    <% control relationName %>
    <% end_control %>

    Have a look at the documentation:

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.