Composables
useCraftUri
Learn how to use the useCraftUri composable.
This composable provides an easy way to retrieve the current URI based on the origin
defined in the siteMap
within nuxt.config.ts
. It enhances multisite support and simplifies querying data from your Craft CMS backend.
Usage
Returns the current URI based on the active site:
const uri = useCraftUri();