> For the complete documentation index, see [llms.txt](https://docs.scaleflex.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scaleflex.com/portals/building-a-portal/sections/gallery/gallery-settings/source.md). Agents can also search and read this documentation through its [MCP server](https://docs.scaleflex.com/~gitbook/mcp).

# Source

Choose which assets the gallery draws from.

**Source** is where you say which assets the gallery shows. What it offers depends on the [display mode](https://docs.scaleflex.com/portals/building-a-portal/sections/gallery/gallery-settings/display-mode.md) you picked, so set that first.

In every mode, the settings are laid out in three tabs:

| Tab          | What belongs here                                                                                              |
| ------------ | -------------------------------------------------------------------------------------------------------------- |
| **Context**  | Where the assets come from — all of them, a folder, a label, a section, or on a dataset page each entry's own. |
| **Criteria** | How that set is narrowed before visitors ever see it.                                                          |
| **Advanced** | Drawing from another project, and folder paths that vary per visitor.                                          |

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FdGr3Zd4fHFcQoAfBeI0C%2Fimage.png?alt=media&#x26;token=a9fbcd38-48e7-4a0c-9ef7-e3b0ee6b83e8" alt=""><figcaption><p>The <strong>Source</strong> panel, with its three tabs.</p></figcaption></figure>

{% hint style="info" %}
**Criteria** and the **Filters** panel are easy to confuse. Criteria decide what the gallery *contains* — visitors never see them and can't undo them. [Filters](https://docs.scaleflex.com/portals/building-a-portal/sections/gallery/gallery-settings/filters.md) decide what visitors can *narrow it by* once it's on screen.
{% endhint %}

## Flat

### Context

**Asset source** decides the pool:

| Option         | Draws from                                              |
| -------------- | ------------------------------------------------------- |
| **All assets** | Everything in the project. No further selection needed. |
| **Label**      | Assets carrying a label you pick.                       |
| **Folder**     | Assets in a folder you pick.                            |

Choosing **Folder** adds **Include sub-folders**, and it is a real decision rather than a detail. Off, the gallery shows only what sits directly in that folder; on, it shows everything beneath it as well. A folder that is mostly sub-folders looks empty with it off.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FbplWnDZivP9alrnHWda5%2Fimage.png?alt=media&#x26;token=f1c860a3-f891-471a-9b84-a2c6fc2b523f" alt=""><figcaption><p>The <strong>Context</strong> tab in Flat mode, where <strong>Asset source</strong> is chosen.</p></figcaption></figure>

#### On a dataset page

On a [dataset page](https://docs.scaleflex.com/portals/portal-settings/datasets/dataset-pages.md) whose dataset has a **DAM assets** field, the Context tab also offers **Assets of this entry**. Pick that field and every entry lists only the assets its own row points at — a folder, a label, a collection or metadata rules, set per row in the dataset — instead of one source shared by every entry. A product page then shows that product's photos, not the whole catalogue's.

| Choice                                | The gallery shows                                                                                                                                                      |
| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Not used — show the source below**  | The **Asset source** you pick below, the same on every entry. The default.                                                                                             |
| A **DAM assets** field of the dataset | The assets that entry's row points at. **Asset source** is hidden: *The gallery shows the assets each entry points at, so the source is set per entry in the dataset.* |

Once the gallery follows the entry:

* An entry whose field is empty shows an **empty gallery** — never the gallery's own source, and never the whole library.
* Search, filters, sorting, the cart and downloads all work within that entry's assets. The **Criteria** tab still narrows them, and a visitor filter can only narrow the row's metadata rules further, never widen them.
* **Dynamic folder path** on the **Advanced** tab is hidden, since the folder now comes from the row.
* The builder canvas previews the gallery with the same entry the rest of the page previews.

{% hint style="info" %}
**Assets of this entry** is a Flat-mode setting: saving the gallery in another display mode clears it. If the field is later deleted, renamed or given another type, the dropdown shows it as *(missing from the dataset)* and warns that every entry shows an empty gallery — pick another field, or **Not used**.
{% endhint %}

### Criteria

Three independent narrowings, each behind its own switch:

| Switch                 | Narrows by                                                                                                                                                                        |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Filter by type**     | Asset format — **Image**, **Video**, **Audio**, **Document** or **Archive**. Pick under **Select types**; the file extensions each chosen type covers are listed under the field. |
| **Filter by tags**     | Tags. Pick under **Select tags**.                                                                                                                                                 |
| **Filter by metadata** | Metadata fields and the values they must hold — one **Property** and **Value** per row; **Add field** adds another row.                                                           |

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2F40HL0lJaKSn6pK5E721V%2Fimage.png?alt=media&#x26;token=cf423812-1b5b-4436-92e5-7936c483215b" alt=""><figcaption><p>The <strong>Criteria</strong> tab — three narrowings, each behind its own switch.</p></figcaption></figure>

Turning a switch off clears what you'd chosen under it.

#### Match each visitor's own attributes

For a select or multi-select field, the **Value** list also offers the Portal's user attributes, shown with an **@** in front (for example **@Region**). Pick one and the gallery doesn't fix the value: it uses the signed-in visitor's own value for that attribute, looked up each time they search. One gallery then shows each visitor the assets meant for their region, market or team. Attributes aren't offered for yes/no fields.

#### Limit assets to the visitor's audiences

Below the three narrowings sits **Limit assets to the visitor's audiences**. Off by default. Turn it on and the gallery only shows each visitor the assets that the asset scopes of their [audiences](https://docs.scaleflex.com/portals/portal-settings/audiences.md) allow.

The switch has no settings of its own — the scopes are set on the audiences, in **Settings** › **Audiences**. Under the switch, the dialog tells you which apply:

* **Applies the scopes of: …** lists the audiences that carry an asset scope, followed by *Visitors outside these audiences see no assets.*
* If no audience has an asset scope yet, a warning says so — every visitor then sees an empty gallery while the limit is on — with a link to **Audiences settings**.

{% hint style="info" %}
People signed in with an Asset Hub account always see every asset; the limit applies to Portal visitors.
{% endhint %}

### Advanced

**Load assets from external project** points the gallery at a different project instead of the Portal's own — useful when one Portal presents assets that live in another team's project. Turn it on and search for the project by name.

**Dynamic folder path** builds the folder path from the visitor's own attributes rather than fixing it. Enter the path under **Folder path**, using variables where the value should differ per visitor, and give a **Fallback folder path** for visitors whose attributes don't resolve to anything. Use it when one gallery should show each customer only their own folder.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FFGl6WM8j1xXxUxKwx4co%2Fimage.png?alt=media&#x26;token=ffb09cf3-73be-4811-a698-26c116072d5d" alt=""><figcaption><p>The <strong>Advanced</strong> tab: an external project, and a folder path built per visitor.</p></figcaption></figure>

{% hint style="info" %}
**Dynamic folder path** is not offered on the home Portal, which has no per-visitor attributes to build a path from.
{% endhint %}

## Sections

Instead of one source, you build a list of them. Each section is a named group with its own assets and its own criteria, and visitors move between them with tabs.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2F1pNnyCrlyBU4M7mlTATr%2Fimage.png?alt=media&#x26;token=78b4e634-3947-47e1-bd4c-5b0f5b7ec927" alt=""><figcaption><p>Sections mode: a list of named groups instead of a single source.</p></figcaption></figure>

* **Limit assets to the visitor's audiences** sits at the top of the list. In this mode it applies to the whole gallery — every section at once — and isn't set per section. It works as described [under Flat](#limit-assets-to-the-visitors-audiences).
* **Add new section** adds one to the bottom of the list.
* Drag a section by its handle to reorder it. The order here is the order visitors see.
* Each section's **…** menu offers **Edit**, **Clone** and **Delete**.

**Edit** opens that one section, with **Back to all sections** to return. A section has the same three tabs:

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2Fakgtkja48BCLm5ULB2AE%2Fimage.png?alt=media&#x26;token=5523879b-fab5-4909-90dd-3c5701ca8961" alt=""><figcaption><p>One section opened for editing, with its own Context, Criteria and Advanced tabs.</p></figcaption></figure>

| Tab          | Holds                                                                                                                                 |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| **Context**  | **Section title** — the tab label visitors read — and the same **Asset source** choice, **Include sub-folders** included.             |
| **Criteria** | The same three narrowings, applied to this section alone.                                                                             |
| **Advanced** | **Load assets from external project**, to draw this section alone from another project, and **Dynamic folder path** for this section. |

Give every section a title. It's what the tab says, and an untitled one reads as **New section**.

## Folders

Pick the **Root folders** the gallery opens at; visitors navigate down from there and can't go above it. **Criteria** — including **Limit assets to the visitor's audiences** — and **Advanced** work as they do for Flat, minus the dynamic folder path.

**Include sub-folders** isn't offered here, and doesn't need to be: in this mode the sub-folders are the navigation, so visitors walk into them themselves rather than you deciding up front whether they are folded into one list.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FOro7WuWd6pPy0fEgrnd3%2Fimage.png?alt=media&#x26;token=797e9767-e667-47d4-bc27-152cbcc21230" alt=""><figcaption><p>Folders mode: choosing the root folders the gallery opens at.</p></figcaption></figure>

## Collections

Pick the collections the gallery opens at. You can choose **more than one** — search for each and add it, and the gallery opens on all of them — even though the field is labelled **Which collection?** in the singular. Sub-collections come with whatever you pick.

**Criteria** and **Advanced** work as they do for Folders.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2F0e6v9c8EZX27FO2fp9Mb%2Fimage.png?alt=media&#x26;token=64acd4a6-9e03-40a0-8720-12ccf5ec994f" alt=""><figcaption><p>Collections mode: choosing the collections the gallery opens at.</p></figcaption></figure>

## Labels

### Context

Pick the labels visitors can browse — **Select all** takes every label in the project, **Clear** empties the selection.

**Cover placeholder** decides what a label shows when it has no preview image of its own:

| Option              | Shows                                                               |
| ------------------- | ------------------------------------------------------------------- |
| **Accent gradient** | A gradient derived from your Portal colour. The default.            |
| **Color**           | A solid colour you choose, by swatch or hex.                        |
| **Gradient**        | A gradient you build yourself.                                      |
| **None**            | No block at all — a text-only card with the label name and a count. |

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2Fh9ixdgoshOq5RCdw3VGv%2Fimage.png?alt=media&#x26;token=a42fcff8-05be-4417-aa6b-89e97760e753" alt=""><figcaption><p>Labels mode: the labels visitors can browse, and the cover placeholder for those without an image.</p></figcaption></figure>

### Criteria and Advanced

As for Folders.
