Module for managing downloads.
$ composer require wirelab/downloads-module
$ php artisan addon:install wirelab.module.downloads
php artisan addon:publish downloads
- Edit the
view
view inresources/<site name>/addons/wirelab/downloads-module/views/download
- In the download module go to
fields
and make a new field - In the
downloads
section click onassignments
and assign the field
- 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_slug
and callrender()
on the downloads. Or callrender()
onpage.your_slug
to 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 %}