Recommendation For Download Stack

Hey all. What do people use for a simple download trigger?

By simple I mean a dead simple one click action. You click the button and the file downloads. No need to right click/option click. No selecting from a dropdown “Download Linked File”. No nothing. One click and the linked file starts downloading. It should be simple but I’m probably just missing something.

The file to download would reside in rw Resources. Thanks in advance for guidance/recommendations.

https://www.doobox.co.uk/stacks_store/demos/truedownload.html
True download is the one I use, I’m sure there are others but I got it in
the bundle sale which in my opinion is worth it.

1 Like

Try simply adding a download attribute to the button link.

There are a few ways to do this as you can tell. One I use is to ZIP my file or folder of files. Clicking on a zip file will auto-download. Dead simple.

Works with any kind of link.

1 Like

New particular process is new to me so I don’t know where that would go. I have Button Plus, Foundation 1 Button and Sweet Button but I image the location of the download attribute you refer to would be similar in all right?
Can you point me?
Thanks in advance.
Cheers,
Craig

What would that download attribute look like, please?

Some of us don’t know as much as you! :slightly_smiling_face:

The download attribute is simply download
If you want to give ot a file name (for the person downloading it) the add the high level file name to the value.

So if I have a file in Resources ,

  1. set the link to the resource you want down loaded.
  2. Hit the + to add a custom Attribute.
  3. set the Name of the attribute to download.
  4. Set the value to the filename (no extension), or leave it blank(remove the default value).

2020-08-14_11-20-11

4 Likes

Can’t get that to work Doug. When I click the Button to dowload, the document opens in a window of my Browser (Safari). I’ve attached my Link settings hoping you can see what I’m doing wrong.

It looks Okay to me.

I just did the same thing and it downloads fine on Safari(Mac), Edge(Chromium) and Firefox. Looks like it should work in most modern browsers (Not IE).

Do you have a URL?

https://dev.healthcareconnects.ca/support-materials/paperwork-payment/

Okay,

The test I did was with the stacks button (comes with stacks). The atribute with the BWD button doesn’t seem to get applied. It also doesn’t seem to work with sweet button, flat button, or Foundation 1 or 6 buttons.

The link attributes don’t seem to be coming across(@joeworkman @Elixir @isaiah?)

They do seem to come across fine with the stacks button, or with the link from within any styled text.

The button stack would need to account for the download attribute in the underlying code. Flat Button does not include that attribute.

My results same as yours Doug. Works a charm with the default button stack. Good to know. I’m hoping one of the developers have a solution/work-around/or a fix

It really depends on how the button stack was implemented. The F6 Button stack has a checkbox that will add this option for you.

1 Like

So to confirm: neither Foundation 1 Button Stack nor Sweet Button will pass through the download attribute.

Here’s hoping for a BWD Button Plus solution then (crossed fingers). Thanks to Doug Bennett I have a work-around in my pocket if that doesn’t happen.

Thanks to all who’ve chimed in.
Cheers,
Craig

Or … as mentioned before you can zip a file/folder and everything will work just fine with that zipped folder. It will auto-unzip on most computers after downloaded. Then you can use any of the above button makers.

1 Like

Correct. This trick will not work with F1 button or Sweet Button.

Okay, I probably wouldn’t wait very long for that. I can’t speak for BWD, but the button you are using is an old foundation version 1 add-on. It’s designed to work only with the older version of Foundation and doesn’t work with F6.

I’d probably take the standard built-in button and style it to look like you want. I just played around with one and got it pretty close to what the current one looks.

There are several ways to use the stacks link control (the one that opens the RapidWeaver link Dialog box).

  1. The stacks built-in button stack uses this way. It takes the complete link output from the RapidWeaver link dialog, including all the custom attributes that the user-specified. T

  2. Many of the 3rd party add-on button stacks use the second way. This extracts the URL only ( using the -href option) from the link dialog’s output. They then build the rest of the anchor tag with the options custom options that the user-specified with the optional controls.

  3. Another newer way to allow the extra options that a 3rd party developer wants to add is how the Source Framework does with its buttons. This way uses the entire link output, including all the custom attributes from the Rapidweaver link dialog box, and then adds or replaces these options with the ones specified in the stacks custom controls. (This option can found on this page of Stacks API Documentation examples 3 through 5).

My issue with number 2 is it’s misleading to the RapidWeaver user. This effects not only the download attribute but every attribute a user adds to the link. Nowhere does it tell you that the custom attributes are getting dropped. The stacks API documentation shows this option for use for things like background images.

The HTML anchor tag supports a large number of custom attributes. Some of these are not visible to the RapidWeaver user. In addition to the `download attribute things like:

  • target - Specifies where to open the linked document
  • referrerpolicy - deals with Privacy, Security
  • Rel=nofollow - Tells search engines not to follow this link
  • rel=noreferrer - tells search engines NOT to consider this link a referral
  • rel=author - identifies the link as the author.
  • rel=license - defines the relationship as a license.
    . HTML and CSS specifications are changing all the time, and attributes are being added.

As a RapidWeaver user, if you think you add a rel=noreferrer or Rel=nofollow to protect your Search Engine ranking, don’t count on it being there if you are using one of these third party stacks.

More thanks Doug for the explanation. I’ve gone the built-in button stack route.