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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Controlling Uploadify files from templates


Go to End


12 Posts   4120 Views

Avatar
CriaturaCreativaStudio

Community Member, 73 Posts

19 March 2011 at 4:17am

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

Avatar
UncleCheese

Forum Moderator, 4102 Posts

19 March 2011 at 5:14am

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 %>

Avatar
Lukin

Community Member, 56 Posts

26 March 2011 at 7:28am

Edited: 26/03/2011 7:30am

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?

Avatar
CriaturaCreativaStudio

Community Member, 73 Posts

30 March 2011 at 1:11pm

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

Go to Top