I have a Category Group that can be 3 levels deep. Each category has its own page and its URI structure appends each category as you go deeper, like so:
{parent ? parent.uri : 'root-uri' }/{slug}
Which produces:
/root-uri/category-1/category-2/category-3
This all works fine.
I then have a field to assign these categories to an entry. My goal is to create a URI format for the entries that include the hierarchy of the categories it's assigned to. Like:
/root-uri/category-1/category-2/category-3/entry-slug
or
/root-uri/category-1/entry-slug
What is the proper URI format for the entries to accomplish this?
Update
Using {categoriesField.last().uri}/{slug} is working, but the .last() function is deprecated.