# Query issues with basic site structure

**URL:** <https://community.prismic.io/t/query-issues-with-basic-site-structure/3232>\
**Category:** Developing with Prismic\
**Created:** [December 17, 2020, 12:13pm UTC](https://community.prismic.io/t/query-issues-with-basic-site-structure/3232 "2020-12-17T12:13:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![milosvu](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/milosvu/32/1318_2.png) [@milosvu](https://community.prismic.io/u/milosvu)\
**Post date:** [December 17, 2020, 12:13pm UTC](https://community.prismic.io/t/query-issues-with-basic-site-structure/3232/1 "2020-12-17T12:13:33Z")

</div>

Hello,

I have a problem identifying the type of document that I am querying. My URL structure is fully dynamic, which means that I cannot insert the type name into the URL. Is it better in my case to have multiple types or to do everything with just one type? The main problem, in that case, would be that the content posts will be difficult to navigate. Is that the case?

Thanks,  
Milos

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [December 18, 2020, 12:23pm UTC](https://community.prismic.io/t/query-issues-with-basic-site-structure/3232/3 "2020-12-18T12:23:10Z")

</div>

Hello @milosvu,

Welcome to the Prismic Forum. Thank you for reaching out.

To analyse the query, can you please provide the followings:

1. Which framework, you are using and the related GitHub repo?
2. An example of your use case?
3. Prismic repository URL?

Thanks,  
Priyanka

---

<div class="post-metadata">

**Author:** ![milosvu](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/milosvu/32/1318_2.png) [@milosvu](https://community.prismic.io/u/milosvu)\
**Post date:** [December 18, 2020, 1:44pm UTC](https://community.prismic.io/t/query-issues-with-basic-site-structure/3232/4 "2020-12-18T13:44:20Z")

</div>

Hello @Priyanka!

We are using the standard approach available in your documentation, but could not find if we need to send "post type" within a query if we already use the UID. This becomes a problem when we have multiple types on the same level within the URL structure. Mainly, that is the use case.

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [December 18, 2020, 4:24pm UTC](https://community.prismic.io/t/query-issues-with-basic-site-structure/3232/5 "2020-12-18T16:24:22Z")

</div>

Hello @milosvu,

You need to send the document type in API query like [here](https://prismic.io/docs/technologies/query-by-id-or-uid-javascript). In `getByUID`, you need to send two parameters: one is document type and another one is uid. It is mandatory to send document type because different custom types can have the same uid.

Now for the another point of having multiple document types for the same level within URL structure:

(I'm assuming you are using nuxt framework)

1. If DOM structure (rendering) is same for all URLs of types and Uid combination.  
For example: If you have folder structure like: `/pages/:document-type/:uid`, and two URLs like `/type1/uid1` and `/type2/uid2`, then after getting different data results from `getByUid` query, same redering can be applied.

2. If DOM structure (rendering) is not the same for all uid and document types combinations, you need to fix the document type in URL like `/pages/type1/:uid`, and `/pages/type2/:uid`.

It would be better if you can share the code with me.

Let me know if you have any other doubt.

Priyanka

---

<div class="post-metadata">

**Author:** ![milosvu](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/milosvu/32/1318_2.png) [@milosvu](https://community.prismic.io/u/milosvu)\
**Post date:** [December 24, 2020, 11:48am UTC](https://community.prismic.io/t/query-issues-with-basic-site-structure/3232/7 "2020-12-24T11:48:17Z")

</div>

Thank you for your reply. Yes, that was helpful, we figured it out. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 25, 2020, 11:48am UTC](https://community.prismic.io/t/query-issues-with-basic-site-structure/3232/8 "2020-12-25T11:48:31Z")

</div>

closed on December 25, 2020, 11:48am UTC as resolved,  flag & select 'Something Else' to reopen.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 12:07pm UTC](https://community.prismic.io/t/query-issues-with-basic-site-structure/3232/9 "2021-12-09T12:07:27Z")

</div>

Opened on December 9, 2021, 12:07pm UTC


