Downloads Block
The Downloads Template defines the HTML structure and content displayed within the Gutenberg editor for the Downloads Block. It is responsible for displaying a heading and a list of downloadable files, each with its own title and description.
Content Editor Fields
Heading
- Description: The main heading text displayed above the list of downloadable files.
- Usage: Use this field to provide a clear title for the section.
- Optional: If no heading is provided, this element will not be displayed.
Files
- Description: A list of downloadable files. Each file can have its own heading, excerpt, and the file itself.
- Usage: Use this field to add and manage the downloadable files. Each file can have a title, a short description, and a link to the file.
- Mandatory: This field is mandatory. If no files are added, the block will not display any file.
Container
- Description: A setting to enable or disable a container around the content.
- Usage: Use this field to add a container around the content.
- Optional: If this field is not set, there is no container.
Active
- Description: A setting to enable or disable the block.
- Usage: Use this field to activate or deactivate the block.
- Mandatory: This field is mandatory. If this field is not set to true, the block will not be displayed.
Example Usage:
Steps:
- Add the block: Insert the Downloads Block into your page or post.
- Fill the fields:
- In the block settings, fill the "Heading" field.
- In the block settings, add the files in the "Files" field.
- In the block settings, set the "Container" field.
- In the block settings, set the "Active" field to true.
- Save the Block: Your Downloads block is now ready for display!
Result:
When properly configured, the Downloads Block will render a section with a heading and a list of downloadable files. Each file will display its title, excerpt, and a link to download the file.

Preview in the editor (body):

Customization:
You can customize the Downloads Block display in the following ways:
- Content Customization: Change the heading text and the files details directly within the block settings.
Benefits:
- Clear Structure: The template provides a simple and organized HTML structure.
- Dynamic Content: The template allows for dynamic content to be inserted.
- Easy to Use: It is simple to configure for the end user.
- Multiple files: You can add multiple files.
- Container: You can add a container.
- Active: You can activate or deactivate the block.