Download the PHP package mdxdave/force-download without Composer
On this page you can find all versions of the php package mdxdave/force-download. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package force-download
ForceDownload plugin for Craft CMS 5.x
Simple Downloader for Craft CMS 5.x
Requirements
This plugin requires Craft CMS 5.x or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require mdxdave/force-download
- In the Control Panel, go to Settings → Plugins and click the “Install” button for ForceDownload.
Using ForceDownload
Just use the following code in your Twig template file (whereas filename is an asset field):
{{ entry.filename[0]|forceDownload }}
To use a rudimental download counter, use the fieldname as 2nd param (the downloadCounter field will be inceremented by 1):
{{ entry.filename[0]|forceDownload("downloadCounter") }}
See example in the folder example.
Brought to you by MDXDave
All versions of force-download with dependencies
PHP Build Version
Package Version
Requires
craftcms/cms Version
^4.0.0|^5.0.0
The package mdxdave/force-download contains the following files
Loading the files please wait ....