# pages()

Helper to build pages collection

****

- Source: <https://github.com/getkirby/kirby/tree/5.5.3/config/helpers.php#L403>

****

```php
pages(array|string ...$id): Kirby\Cms\Pages|null
```

## Parameters

| Name | Type | Default | Description |
| ---- | ---- | ---- | ---- |
| `...$id` | `array` or `string` | – | – |

## Return types

`Kirby\Cms\Pages` or `null`

## Examples

```php
<?php $collection = pages(['home', 'blog']) ?>
<?php $collection = pages([$page, $page->children()->first()]) ?>
```
<info>
The `pages()` helper fetches published pages only; ids of draft pages are ignored.
</info>