Resource: Url
The Url resource is used to get a page by it's url path. By using this resource, uHeadless looks at the defined redirect rules and responds accordingly. Also if a node dosen't exits, but a redirect rule does, it will return a redirect response.
Example
ts
const { data: page } = useUheadless('url', {
path: '/about-us',
});Options
This resource has these 4 properties, where the path property is required.
| Property | Required | Default | Type | Description |
|---|---|---|---|---|
| breadcrumb | No | false | boolean | Include the breadcrumb property in the document result. |
| depth | No | 2 | number | The depth of relations to include in the response. |
| domain | No | string | Scope the results to a specified hostname define under "Culture and hostnames" in Umbraco. | |
| path | Yes | string | The url path. |
The
depthanddomainoptions are configurable within younuxt.config.tsfile.