About
The Custom layouts feature provides a versatile and dynamic approach to data visualization by using Mustache templates. It allows power users to go beyond standard layouts and design bespoke structures for Dash blocks and detail areas without writing PHP code.
By using Mustache, you can seamlessly iterate through datasets, retrieve specific field values, and use conditional rendering to show or hide elements based on data availability.
Managing your layouts
You can manage all custom layouts by navigating to Site administration > Plugins > Local plugins > Dash Addons > Manage layouts.
The following actions are available:
Create custom layout – Open the editor to build a new template from scratch.
Edit – Modify the Mustache code or configuration of an existing layout.
Delete – Remove a layout from the system.
Available settings
When creating or editing a layout, the following configurations determine how the layout behaves within the Dash block settings:
Name – The internal name used to identify the layout in the management list.
Support field visibility – If enabled, the Fields preferences remain visible in the Dash block settings, allowing users to map data to your template variables. If disabled, the fields are managed entirely within your Mustache code and hidden from the block preferences.
Support filter – Enables the Filters preferences of the used data source for this layout.
Support pagination – If disabled, all items are displayed in the block without pagination.
Support sorting – Enables the ability for users to reorder data displayed inside the block.
Type – Defines where this layout can be used:
Block – Appears as an option in the block's Layout preferences.
Details area – Appears as an option for the the block's Details area preferences.
Both – Makes the layout available in both locations.
Template – The main editor where you write your Mustache and HTML code.
Note: To help you build your templates, a list of available data placeholders is provided directly below the template editor. For a full breakdown of these tags, see custom layout placeholders in Dash.