Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » link to download

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1483 Views
  • blaater
    Avatar
    Community Member
    22 Posts

    link to download Link to this post

    Hello,

    I'm trying to create a template with images. Every image is a link with a download, only I can't figure out how to do that. Can somebody help me with that?
    The code in my template is:

    <ul id="informatieCentrum">
    <% control Informatie %>
    <li><a href="linkToDownload" id="trigger_$ID" title="">$Image.SetWidth(140)</a></li>
    <% end_control %>
    </ul>

    In the cms I've created a second imageField for selecting the file to download.
    Is that the right way to do this?

    Thanks in advance for your help
    Greets.

  • spenniec
    Avatar
    Community Member
    37 Posts

    Re: link to download Link to this post

    Hi,
    Are you able to post your Informatie.php file

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: link to download Link to this post

    you can do <a href="$Image.URL" .. and that should be able to link to the actual version of the image and allow people to download it

  • blaater
    Avatar
    Community Member
    22 Posts

    Re: link to download Link to this post

    Thanks for the quick reply, the problem is solved with $Image.URL .

    1483 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.