Skip to main content

Project Gallery

A project's image gallery, with a lightbox and per-breakpoint columns.

The block renders through the project_gallery element — the same PHP that runs in the page builder, so the front end is identical either way.

Needs the Portfolio extension

This element ships with the Portfolio extension, which is inactive by default. Activate it under Unyson+ → Extensions and the block appears in the inserter.

With the extension off the block does not register at all — deliberately, so it cannot appear as an inserter entry with an empty sidebar that renders nothing.

What the sidebar exposes

OptionWhat it does
project_idWhich project (empty = the current one)
columnsColumns on desktop
columns_tabletColumns on tablet
columns_mobileColumns on mobile
gapSpace between images
ratioCrop ratio
image_sizeWhich registered image size
lightboxOpen images in a lightbox
captionsShow captions
no_results_textWhat to say when the project has no images
text_colorText colour
bg_colorBackground
font_size_presetText size preset

Anything not listed stays available in the page builder, and round-trips untouched.

It reads the current project

Leave project_id empty and the element reads whichever project it finds itself in — which is what a Theme Builder project template wants. Set it, and the element pins that one project, which is what a landing page wants.

In an ordinary page with neither, there is no project to read, and the block says so rather than rendering nothing.

Set all three column counts

They are one responsive decision in three parts, and only the desktop one is visible while editing — the same trap as the carousel's.