---
title: "getPages"
canonical: "https://support.appfire.com/space/PSCONF/15306268/getPages"
format: markdown
---
> Macro (aura-html)

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | getPages(parentId) | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Returns all descendants of a page (all levels, not only direct children) or a set of pages matching space key and title.

Returns all descendants of a page (all levels, not only direct children) or a set of pages matching space key and title.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | parent ID | Number | Yes | ID of the selected page for which to retrieve all child pages. |

## Return Type

**Number []**

## Example

```javascript
number [] allChildren = getPages(11801);
for(number childPage in allChildren) {
	%childPage%.labels += "newLabel";
}
```

## See also

> Macro (contentbylabel)