Jump to:

7938 Posts in 1541 Topics by 945 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Proper Download URL

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 713 Views
  • SSTN
    Avatar
    Community Member
    9 Posts

    Proper Download URL Link to this post

    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.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Proper Download URL Link to this post

    $YourFile.URL

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

  • SSTN
    Avatar
    Community Member
    9 Posts

    Re: Proper Download URL Link to this post

    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?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Proper Download URL Link to this post

    $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

    713 Views
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.