wirelab / downloads-module
Module for managing downloads.
Installs: 78
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 2
Open Issues: 0
Type:streams-addon
pkg:composer/wirelab/downloads-module
This package is not auto-updated.
Last update: 2021-02-20 08:51:30 UTC
README
⚠️ This repository has been deprecated ⚠️
Module for managing downloads.
Installation
$ composer require wirelab/downloads-module $ php artisan addon:install wirelab.module.downloads
Overwriting the default view
php artisan addon:publish downloads- Edit the
viewview inresources/<site name>/addons/wirelab/downloads-module/views/download
Adding fields to a download
- In the download module go to
fieldsand make a new field - In the
downloadssection click onassignmentsand assign the field
Adding downloads to a page
- Create a multiple field in the pages module, assign it to Locations > Locations
- Assign the field to a page type
- In the page type loop over
page.your_slugand callrender()on the downloads. Or callrender()onpage.your_slugto have it to loop for you. Examples:
page.your_slug.render()
{% for download in page.your_slug %}
download.render()
{% endfor %}
Not calling render will return the attributes of the download.
{% for download in page.your_slug %}
{{ download.name }}
{{ download.description }}
{% endfor %}