Disable Route Interception for nested routes
Unanswered
Irish Red and White Setter posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Irish Red and White SetterOP
I am currently working on a Next.js project where I have implemented a modal that opens when navigating to a specific route (e.g.,
However, I have encountered a challenge when trying to open a different page within the same modal. While I have managed to achieve this, I am facing an issue when the user is on the standard page (the non-modal route) and clicks a link to open the subpage. In this scenario, the subpage is intercepted and opens in a modal, which is not the desired behavior.
To illustrate, I attached my folder structure.
I am looking for a way to disable route interception for this specific case, so that when the user is on the standard page and clicks the link to the subpage, it opens as a standard page rather than in a modal.
[Edit phibr0/next-intercepted-modal/main on codesandbox](https://codesandbox.io/p/github/phibr0/next-intercepted-modal/main?file=%2Fapp%2Fpage.tsx&embed=1)
/[id]/
). This functionality is working as expected.However, I have encountered a challenge when trying to open a different page within the same modal. While I have managed to achieve this, I am facing an issue when the user is on the standard page (the non-modal route) and clicks a link to open the subpage. In this scenario, the subpage is intercepted and opens in a modal, which is not the desired behavior.
To illustrate, I attached my folder structure.
I am looking for a way to disable route interception for this specific case, so that when the user is on the standard page and clicks the link to the subpage, it opens as a standard page rather than in a modal.
[Edit phibr0/next-intercepted-modal/main on codesandbox](https://codesandbox.io/p/github/phibr0/next-intercepted-modal/main?file=%2Fapp%2Fpage.tsx&embed=1)
![Image](https://cdn.discordapp.com/attachments/1182965850521739314/1182965850815344712/tree.png?ex=65869dcd&is=657428cd&hm=ceec76756b5d02747c914f6126ca2ee3b97143bfcfe05f76d8d8cabe0e80df7a&)