Skip to content

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.

PropertyRequiredDefaultTypeDescription
breadcrumbNofalsebooleanInclude the breadcrumb property in the document result.
depthNo2numberThe depth of relations to include in the response.
domainNostringScope the results to a specified hostname define under "Culture and hostnames" in Umbraco.
pathYesstringThe url path.

The depth and domain options are configurable within you nuxt.config.ts file.