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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Proper Download URL


Reply


4 Posts   737 Views

Avatar
SSTN

Community Member, 9 Posts

8 September 2010 at 1:48pm

Just wondering what the proper ss code is to create a relative download link.

ie: <a href="&BaseHref/&Name">Click Here to Download<a/> or something similar.

Avatar
UncleCheese

Forum Moderator, 4094 Posts

8 September 2010 at 1:55pm

$YourFile.URL

---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com

Avatar
SSTN

Community Member, 9 Posts

8 September 2010 at 2:39pm

Awesome, thanks. Let's just pretend I'm really stupid for a second.

<% control Resources %>
<p>
<hr />
<b>&quot;$Name&quot;</b>
<hr />
<% control Attachment %>$Player(640,480)<% end_control %><br />
<i>$Description</i><br>
</p>
<% end_control %>

I want to insert a link into this control set to download the posted mp3's.
How does $YourFile.URL work in this instance?

Where should I look for this kinda info?

Avatar
UncleCheese

Forum Moderator, 4094 Posts

8 September 2010 at 3:21pm

$Attachment.URL.. "YourFile" is just a placeholder name of the file relationship you've created.

---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com