# Route Resolver using field

**URL:** <https://community.prismic.io/t/route-resolver-using-field/9544>\
**Category:** Developing with Prismic\
**Tags:** nextjs\
**Created:** [March 28, 2022, 9:24pm UTC](https://community.prismic.io/t/route-resolver-using-field/9544 "2022-03-28T21:24:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhayes](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/dhayes/32/4082_2.png) [@dhayes](https://community.prismic.io/u/dhayes)\
**Post date:** [March 28, 2022, 9:24pm UTC](https://community.prismic.io/t/route-resolver-using-field/9544/1 "2022-03-28T21:24:04Z")

</div>

Is there a way to use a field as part of a route resolver?

For example, lets say I have a "page" document type:

```auto
- path
- uid
- title
- content

```

...where the "path" is a string the content author puts in (e.g. "/parent/child/").

And I want the route to do something like this (in order to handle nested pages):

```auto
        {
            type: "page",
            path: "/:path?/:uid",
            resolvers: {
                path: "path"
            }
        },

```

I can get a route resolver to work when it's referencing an external document type but not when it's a field inside the current model.

Am I missing something?

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [March 29, 2022, 3:25am UTC](https://community.prismic.io/t/route-resolver-using-field/9544/2 "2022-03-29T03:25:06Z")

</div>

Hey @dhayes, thanks for reachign out.  
It is possible to create nested paths with Content Relationship fields. Read the dedicated doc to learn how to do it:

> **[Define Paths with Next.js](https://prismic.io/docs/technologies/define-paths-nextjs#advanced-route-resolver-nested-example)**
>
> This article will show you how to do dynamic routing in your Next.js and Prismic project.
