Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dipa 88 posts 370 karma points
    Dec 22, 2015 @ 11:13
    Dipa
    0

    Download document

    Hello,

    I have one page in that I have list of all documents. Now I want that on click of any document name That document should get download. I have that documents in media tree node.

    Guide me for this.

    Thank You,

    Dipa

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Dec 22, 2015 @ 11:22
    Dennis Aaen
    0

    Hi Dipa,

    Do you any chance of share you code you have so far, where you are listing all the documents.

    Then it´s easier to help you with some specific code example, and guide you in the right direction.

    /Dennis

  • Dipa 88 posts 370 karma points
    Dec 22, 2015 @ 12:34
    Dipa
    0

    Hi Dennis,

    I don't have any code. Just list of documentName with <ul><li> structure using foreach loop.

    Thanks.

    Dipa

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Dec 22, 2015 @ 13:09
    Dennis Aaen
    0

    Hi Dipa.

    What you need to do is to use the .Url https://our.umbraco.org/documentation/Reference/Querying/IPublishedContent/Properties

    So if your variable in your foreach loop is var item, then the code would look like this

    <a href="@item.Url">@item.Name</a>
    

    Hope this helps,

    /Dennis

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies