---
title: "Page Link Block — Reference an Existing Page"
description: "Add a non-owning page reference by ID. The host supplies an authorized title and URL, while the saved block keeps only the opaque page ID."
source: https://blokeditor.com/docs/page-link/
lastmod: 2026-10-05
---

Framework JavaScript

Block Tools Page link

# Page link block: reference an existing page

A non-owning reference to a host page. It saves only `data.pageId` and never creates or owns a page. Use it for links to an existing page; an owning `page` block is the page tree edge.

Register `PageLink` with the same authorized `PageConfig` as `Page`. Missing or denied metadata shows a neutral or locked label without the page title or URL.

### Import

TypeScript

```
import { PageLink } from '@bloklabs/core/tools';
```

### Save Data

TypeScript

```
interface PageLinkData {
  pageId: string;
}
```

JSON

```
{
  "id": "ref001",
  "type": "page-link",
  "data": { "pageId": "p1" }
}
```

### Usage Example

TypeScript

```
import { Blok } from '@bloklabs/core';
import { PageLink } from '@bloklabs/core/tools';

const editor = new Blok({
  holder: 'editor',
  tools: {
    'page-link': {
      class: PageLink,
      config: {
        resolve: (pageId) => myApi.getAuthorizedPageInfo(pageId),
        href: (pageId) => `/pages/${pageId}`,
        subscribe: (pageId, onChange) => myApi.subscribePage(pageId, onChange),
      },
    },
  },
});
```
