Tassos Marinos Tassos Marinos Joomla Extensions

The Download Button Field

Updated 03 Jul, 2023

The Download Button custom field allows you to download files via the click of a button. This instructs (forces) the browser to download the URL you specify instead of navigating to it, so the user will be prompted to save the file locally.

How to add a Download Button Custom Field to Joomla! Articles

The Download Button field provides you the way to select a file from a dircetory and create a button which will be displayed at your frontend.

acf-download-button-field-settings

Let's see what each option does.

Name Description
Name The name will be used to identify the field. Leave this blank and Joomla will fill in a default value from the title.
Label The label of the field to display.
Description A description of the field that will be displayed in the label tooltip.
Required Is this a mandatory field?
Directory Set the directory to search for files.
Include Files Set the files to be included in the directory list.
Excluded Files Set the files to be excluded from the directory list.
Button Label Set the button name.
Button Class Set the button classes.

Usage

Once you are in your Article's Edit screen, choose the "Fields" Tab to see the Download Button custom field as you can see in the screenshot below.

acf-download-button-usage

In this drop-down you can select which file to download via the download button on the frontend.

Frontend Display

Take a look at the screenshot below to see how it could be displayed in your frontend.

acf-download-button-frontend

Frequently Asked Questions

How do I set a directory and view it's files?

You can set a specific folder in which the Download Button will search and return a list of files for you to select. To set the directory, enter the path on the setting Directory.

Can I select specific files such as png and exclude pdf files?

To include or exclude specific file types, you can set them on the settings Include Files and Exclude Files respectively. To add more than one file type, you will need to separate them via the character "|". For example: .pdf|.jpg

Can I customize the button?

You can set the Label and Class of the button via the settings Button Label and Button Class. The Button Class can take any class you desire to make it fit your needs.

Can I use ACF - Download Button with YooTheme Pro Dynamic Content?

The "ACF - Download Button" custom field is now compatible with YooTheme Pro Dynamic Content and you can use it to populate YooTheme elements such as the Text, Image, HTML, Button elements.

How can I override the layout of "ACF - Download Button" custom field?

To override the "ACF - Download Button" custom field, read here: How to override the "ACF - Download Button" custom field.