Portfolio template
works.html is the optional gallery template. If the package doesn’t include it, the portfolio is shown in the standard grid, in the theme’s colors.
Fields
Section titled “Fields”| Field | Contents |
|---|---|
works[] |
id, title, alt, description, category, worker, service, location, thumb, large, width, height |
categories[] |
id, name (only categories with published items) |
An element with data-work-id="{{id}}" opens the gallery dialog for that item. The system builds the dialog, filter and booking button; the template only sets the look of the grid.
Example
Section titled “Example”<div class="at-works"> {{#works}} <figure class="at-work" data-work-id="{{id}}" role="button" aria-label="{{title}}"> <img src="{{thumb}}" alt="{{alt}}"> <figcaption><strong>{{title}}</strong> <small>{{worker}}</small></figcaption> </figure> {{/works}} {{^works}}<p>No published work yet.</p>{{/works}}</div>Always use the alt from the data. Use thumb for the grid; the large image loads only in the dialog.