Templating the UID field
The UID field is a unique identifier that can be used specifically to create SEO and user-friendly website URLs.
This page assumes that you have already included the prismic-vue plugin in your project or that you are using the Prismic Vue.js starter. Check out the Integrating with existing project page to learn how to get setup.
Get the UID value
You can get the UID value of a document by accessing its uid property:
const uid = document.uid;
Vue Router: Reacting to params changes
If your component is retrieving content from the Prismic API based on one of the route params, make sure to take a look at our Reacting to params changes page.