Behrouz Riahi
Behrouz Riahi

Reputation: 1791

how to display the "URL" of a zip file as a download button?

am using aldeed:collection2 package for my collection and one of the element in the documents is the URL of a zip file.

I already fetched the URL "item.file" but I want to provide that URL as a button, once clicked the download will start.

How do i do this?

thanks

Upvotes: 2

Views: 47

Answers (1)

Stephen Woods
Stephen Woods

Reputation: 4049

If it's a .zip file, you just need to wrap it in an <a> tag:

<a class="btn btn-primary" href="{{item.file}}">Click to Download</a>

Note that I'm using Bootstrap classes to make it look like a button.

Upvotes: 2

Related Questions