Link page
swebsy_link_pageWire an existing link to a project page by setting its page target or href, keeping navbar hrefs and active states in sync after page creation.
Instructions
Point an existing link at a project page — the same wiring the UI's 'Link to' picker does. Pass the link's targetId or targetPath (from read_page) and the target page (id or name). For a navbar link this sets its page target so the href and active state stay in sync; for a plain link or button it sets href to the page's ./slug.html. Use after create_page to wire a navbar to the new page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | Page id or name to link to. | |
| targetId | No | The link by its id, as `read_page` shows it after `#` (e.g. "ieyubib", or "call-2-2" in a symbol instance). Stays valid when other components move or are added, unlike a path. Pass this OR the path, not both. | |
| targetPath | No | Zero-based component indexes from the current page root, exactly as returned by `read_page` (e.g. the nav link inside the navbar). |