-
Notifications
You must be signed in to change notification settings - Fork 0
Initial setup
The Downloads block makes heavy use of file metadata if you configured the lukasbestle.downloads.fields
option. Make sure that each of your downloads has the metadata set in its meta .txt
file (files where a field query returns an empty value are still displayed, but of course can't be filtered by that field).
To allow editors to set the metadata, add fields to the download file blueprint in /site/blueprints/files/
(e.g. download.yml
).
To make the frontend search work, you also need to add a title
field to the download file blueprint (searching through the filenames is unfortunately not possible with Kirby's core search component; get in touch if you need this feature). The title
field will also be displayed as the "human-readable" file title in the default block snippet.
You can use the Downloads block with the Kirby blocks
and layout
fields. You need to enable the block in the blueprint for each field where you want to use the block:
fields:
text:
label: Blocks
type: blocks
fieldsets:
- downloads
# other block types...
Of course you can customize the list of blocks even more, e.g. with groups.
The block comes with a default block snippet, but without any CSS code for the site frontend. This allows you to adapt the design of the block to your site.
Congratulations, the Downloads Block plugin should now be ready to go! You can now create your first block.
If you want, you can set up the following features: