# Internal Linking with Route Params

**URL:** <https://community.hubspot.com/t/internal-linking-with-route-params/115790>\
**Category:** CMS Development\
**Created:** [September 4, 2024, 4:52pm UTC](https://community.hubspot.com/t/internal-linking-with-route-params/115790 "2024-09-04T16:52:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![KWallace7](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@KWallace7](https://community.hubspot.com/u/KWallace7)\
**Post date:** [September 4, 2024, 4:52pm UTC](https://community.hubspot.com/t/internal-linking-with-route-params/115790/1 "2024-09-04T16:52:42Z")

</div>

Hi!

I have a question for linking from one page to another with route parameters. We have a react app running with a bunch of products, and to filter the products there are route params added. I want to link from the home page to this filtered version of the Products page. There are a lot of instances of this so want to do it through the CMS if possible. I know it is possible to link these from different pages with set a tags in the code as well.

Some more info. If the Link or URL CMS field is set to content you can set it to the Products page, but not a filtered Products page. If it is set to the External setting it throws an error as it is under the same domain.

Let me know if there is a solution to this!

Best,

Katie

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [September 4, 2024, 11:33pm UTC](https://community.hubspot.com/t/internal-linking-with-route-params/115790/2 "2024-09-04T23:33:44Z")

</div>

Hi, @KWallace7 👋 Thanks for your question. I’d like to invite some of our amazing community experts who have React experience to the conversation. Hey @Teun @james-portant @Kevin-C do you have any suggestions for @KWallace7?

Thank you very much for taking a look! — Jaycee

---

<div class="post-metadata">

**Author:** ![KWallace7](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@KWallace7](https://community.hubspot.com/u/KWallace7)\
**Post date:** [September 6, 2024, 6:46pm UTC](https://community.hubspot.com/t/internal-linking-with-route-params/115790/3 "2024-09-06T18:46:28Z")

</div>

Hey Jaycee!

I wanted to circle back on this. I’m not sure it is an actual React problem. More just that I can’t link to a filtered page in the CMS. Here’s an example.

Under content for the URL I can set it to the Products Page, but not a filtered version of the Products Page, as that is not an option.

Under External for the URL it fails when I set it to [https://example.com/products?filter={example-filter}](https://example.com/products?filter=%7Bexample-filter%7D)

Additionally I get this error message on the page when I set an external URL with the route params.

`{"status":"error","message":"Cannot parse path {url={type=EXTERNAL, content_id=null, href=https:",`

Finally in the console I get a 400 bad request error.

Best,

Katie

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [September 10, 2024, 5:42pm UTC](https://community.hubspot.com/t/internal-linking-with-route-params/115790/4 "2024-09-10T17:42:11Z")

</div>

Thanks for clarifying @KWallace7 👋 It sounds like the link is getting treated as a fully external link vs trying to link internally with query parameters. Which is giving the 404.

Have you looked into building a custom module and leveraging HubL? Hey @Anton @Jnix284 @Stephanie-OG have you tackled anything similar in your recent project work?

Thanks for taking a look! — Jaycee

---

<div class="post-metadata">

**Author:** ![jnix284](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jnix284/32/29_2.png) [@jnix284](https://community.hubspot.com/u/jnix284)\
**Post date:** [September 10, 2024, 5:59pm UTC](https://community.hubspot.com/t/internal-linking-with-route-params/115790/5 "2024-09-10T17:59:48Z")

</div>

Hi [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074) I haven’t run into this error specifically, but I believe I’ve worked on a project with a similar objective @KWallace7.

If I’m understanding correctly, you have a product page that has filters and you want to add links to that page with the products pre-filtered?

I was the PM for a custom project for POWER Pro theme to add URL parameters for the product page and as Jaycee mentioned, it required a custom module to configure the parameters so they could be added to the filters. The code required is beyond my capabilities with HubL, but I can at least confirm it’s possible and maybe one of the others will be able to help further!

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [September 10, 2024, 7:23pm UTC](https://community.hubspot.com/t/internal-linking-with-route-params/115790/6 "2024-09-10T19:23:40Z")

</div>

Thanks @Jnix284 🙌 — Jaycee
