> ## Documentation Index
> Fetch the complete documentation index at: https://crossword.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Page groups

> Define which store pages, and optionally which shoppers, a dynamic component targets. Match pages by web address, by table rows, or by the results of a saved query.

A page group is a named set of pages, such as "Product pages" or "Energy products". You place a component on a page group. A Workflow then generates that component's content for every page in the group.

Page groups have their own entry in the left navigation. They are shared, so a single group can serve multiple components.

## Matching methods

When you create a page group, you first choose how Crossword identifies its pages.

| Method | Best for | Example |
| - | - | - |
| By web address | Pages that share an address structure. | Address starts with `/products/` |
| A page for each row of a table | Pages that each represent one record, such as a product. | One page for each row of the Products table |
| The rows a saved query returns | A filtered or joined set of records. | Every product whose Category is Energy |

### Match by web address

Choose a match type: **starts with**, **exact**, **contains**, or **pattern**. As you type, the dashboard shows examples of the addresses each type matches.

### Match by table rows or a saved query

Specify how a page address maps to a record. Either a column holds the page address, or a pattern extracts part of the address and matches it to a column, such as the product handle.

To narrow the group, use **Only records where** to require that a column **is**, **is one of**, or **contains** a value.

A saved query supports two modes.

* **A saved query that returns a list.** Each row becomes a page in the group. Very large lists are capped.
* **A saved query that requires inputs.** Each input is filled from the page the shopper opens. An input can take the page's address, its path, its last segment, a segment extracted with a pattern, a page parameter such as `?color=red`, or a fixed value. Pages in this mode are written on their first visit.

Saved-query groups also include a **Rewrite when a table it reads changes** switch. It is off by default. Turn it on to have the Workflow regenerate pages when an underlying table changes.

> [!WARNING]
>
> Crossword does not verify whether a table or saved query holds per-customer data. All shoppers on a page see the same content, so choose a source that contains no per-customer data.

## Visitor conditions

A page group can also specify which shoppers it applies to. Use visitor conditions such as device, arrival source, or segment.

## Excluded pages

Any page group can list pages to exclude. An excluded page is never part of the group, even when it matches the group's rules.

## Test a link

A saved page group opens as a settings page with a link tester. Paste a page address to confirm whether it belongs to the group and which record it matches.

## Edit a page group

Changing a group's name or rules never triggers regeneration of its pages.

* The Workflow writes pages that newly match, as usual.
* Pages that no longer match stop displaying the component.

## Example

The following group targets Energy product pages, matched to the Products table by handle.

```yaml theme={null}
Name: Energy products
Pages: A page for each row of the Products table
Match: The last part of the address equals the Handle column
Only records where: Category is Energy
Leave out: /products/gift-card
Visitor conditions: None
```

## Related

> [card] [Dynamic components](https://crossword.ai/docs/components/dynamic/overview.md)

> [card] [Place a component](https://crossword.ai/docs/components/dynamic/placement.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.