7913 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Controlling Uploadify files from templates
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | ||
| Author | Topic: | 1780 Views |
-
Re: Controlling Uploadify files from templates

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
-
Re: Controlling Uploadify files from templates

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 %> -
Re: Controlling Uploadify files from templates

26 March 2011 at 7:28am Last edited: 26 March 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?
-
Re: Controlling Uploadify files from templates

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.comI still struggling with some things, but you can browse it in general. Uploadify was a great help for me!
Thanks Again
Eduardo
| 1780 Views | ||
| Go to Top |

