2017 © Pedro Peláez
 

craft-plugin force-download

Force download of assets

image

mdxdave/force-download

Force download of assets

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 2 Versions
  • 600 % Grown

The README.md

ForceDownload plugin for Craft CMS >= 4.0.x

Simple Downloader for Craft CMS >= 4.0.x, (*1)

Requirements

This plugin requires Craft CMS 4.0.x or later., (*2)

Installation

To install the plugin, follow these instructions., (*3)

  1. Open your terminal and go to your Craft project:, (*4)

    cd /path/to/project
  2. Then tell Composer to load the plugin:, (*5)

    composer require mdxdave/force-download
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for ForceDownload., (*6)

Using ForceDownload

Just use the following code in your Twig template file (whereas filename is an asset field):, (*7)

     {{ entry.filename[0]|forceDownload }}  

To use a rudimental download counter, use the fieldname as 2nd param (the downloadCounter field will be inceremented by 1):, (*8)

     {{ entry.filename[0]|forceDownload("downloadCounter") }}   

See example in the folder example., (*9)

Brought to you by MDXDave, (*10)

The Versions

15/08 2017

dev-master

9999999-dev

Force download of assets

  Sources   Download

MIT

The Requires

 

cms timeago craftcms craft-plugin craft

02/08 2017

1.0.0

1.0.0.0

Force download of assets

  Sources   Download

MIT

The Requires

 

cms timeago craftcms craft-plugin craft