Jump to:

7938 Posts in 1540 Topics by 945 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Controlling Uploadify files from templates

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2
Go to End
Author Topic: 2204 Views
  • CriaturaCreativaStudio
    Avatar
    Community Member
    73 Posts

    Re: Controlling Uploadify files from templates Link to this post

    Uncle!

    Tnx again that did the trick!
    Now i can sort all the files as you do in your tutorial...

    I still have a couple of questions (i don't want this appear as abuse):

    i've pulled the filles according you indication below, what i need to know, if there is a easy way to reescale them, i usually use SetWidth,

    Image.SetWidth(100)

    1) but what should be the name of the images pulled from the uploadify module? Since i've did the trick declaring the whole img tag.

    2) is there a way to assign alt atributtes or so via the uploader, so i can pull the images with their alt fields or descriptions?

    Sorry for bothering you,

    Thanks again

    Ed

  • UncleCheese
    Avatar
    4085 Posts

    Re: Controlling Uploadify files from templates Link to this post

    I'm not quite sure what you mean, but you can control a SetWdith() function just like any other template function.

    <% control MyImage %>
    <% control SetWidth(100) %>
    <img src="$URL" alt="some alt text" />
    <% end_control %>
    <% end_control %>

  • Lukin
    Avatar
    Community Member
    42 Posts

    Re: Controlling Uploadify files from templates Link to this post

    HI UncleCheese

    Im using your sweet module too.

    But this Code doesnt work...
    It's a has_many relation I'm using. Guess the code is for has_one?

    <% if MyImages%>
    <% control MyImages%>
    <% control SetWidth(100) %>
    <img src="$URL" alt="some alt text" />
    <% end_control %>
    <% end_control %>
    <% end_if %>

    this is working (with <%control SetWidth(100) %> $Filename is empty)

    <% if MyImages%>
    <% control MyImages%>
    <img src="$Filename" alt="some alt text" />
    <% end_control %>
    <% end_if %>

    $URL is http://

    I tried $Filename, $Parent.Filename...

    Do you have any idea what's wrong?

  • CriaturaCreativaStudio
    Avatar
    Community Member
    73 Posts

    Re: Controlling Uploadify files from templates Link to this post

    Uncle!

    I wanted to thank you again for your help, part of the lessons you gave me here are on my new personal website, you can check it at:
    http://www.eduardocesario.com

    I still struggling with some things, but you can browse it in general. Uploadify was a great help for me!

    Thanks Again

    Eduardo

    2204 Views
Page: 1 2
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.