# Passing Tag Path into Page From Horizontal Menu

**URL:** <https://forum.inductiveautomation.com/t/passing-tag-path-into-page-from-horizontal-menu/29264>\
**Category:** Ignition Early Access\
**Created:** [October 21, 2019, 8:36pm UTC](https://forum.inductiveautomation.com/t/passing-tag-path-into-page-from-horizontal-menu/29264 "2019-10-21T20:36:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![christopher.green](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@christopher.green](https://forum.inductiveautomation.com/u/christopher.green)\
**Post date:** [October 21, 2019, 8:36pm UTC](https://forum.inductiveautomation.com/t/passing-tag-path-into-page-from-horizontal-menu/29264/1 "2019-10-21T20:36:59Z")

</div>

I have a view that I have configured that accepts a tag path to indirectly animate graphics and I’m trying to configure a page to use this as a primary view and still pass the path through. Is there a way to pass a tag path into the URL? I can pass numbers and string values but it looks to fall apart with the ‘/’ that are present in a tag path. Is there some way to do this that I’m missing?

Page URL is set up as /level3/:path where the path gets replaced with a tag path.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 21, 2019, 8:44pm UTC](https://forum.inductiveautomation.com/t/passing-tag-path-into-page-from-horizontal-menu/29264/2 "2019-10-21T20:44:09Z")

</div>

Try using `urllib.quote_plus()` to encode `path` when generating the URL.

---

<div class="post-metadata">

**Author:** ![christopher.green](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@christopher.green](https://forum.inductiveautomation.com/u/christopher.green)\
**Post date:** [October 21, 2019, 9:02pm UTC](https://forum.inductiveautomation.com/t/passing-tag-path-into-page-from-horizontal-menu/29264/3 "2019-10-21T21:02:38Z")

</div>

> [@pturmel](#):
>
> urllib.quote\_plus()

That did it. Thanks!

---

<div class="post-metadata">

**Author:** ![andytimc](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andytimc/32/11938_2.png) [@andytimc](https://forum.inductiveautomation.com/u/andytimc)\
**Post date:** [November 21, 2019, 8:02pm UTC](https://forum.inductiveautomation.com/t/passing-tag-path-into-page-from-horizontal-menu/29264/4 "2019-11-21T20:02:29Z")

</div>

Did you open the page through scripting or the Event Configuration and set up the information with urllib.quote\_plus() in the Set Page area? I can’t seem to get this to work as a configured event.

---

<div class="post-metadata">

**Author:** ![christopher.green](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@christopher.green](https://forum.inductiveautomation.com/u/christopher.green)\
**Post date:** [November 22, 2019, 4:47pm UTC](https://forum.inductiveautomation.com/t/passing-tag-path-into-page-from-horizontal-menu/29264/5 "2019-11-22T16:47:10Z")

</div>

I opened it through scripting and passed the path into the url. I’m using the system.perspective.navigate() function and building the URL that I pass into it. The tag path has to go through the urllib.quiote\_plus() before being added to the URL to work. I will note that spaces have to be replaced as well if you have any in the path.

---

<div class="post-metadata">

**Author:** ![christopher.green](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@christopher.green](https://forum.inductiveautomation.com/u/christopher.green)\
**Post date:** [November 22, 2019, 5:08pm UTC](https://forum.inductiveautomation.com/t/passing-tag-path-into-page-from-horizontal-menu/29264/6 "2019-11-22T17:08:06Z")

</div>

Just for reference here is the whole script.

import urllib  
path = self.view.params.path  
path = path.replace(’ ', ‘%20’)  
path = urllib.quote\_plus(path)  
name = self.view.custom.name  
url = ‘/level3/SDC/’ + name + ‘/’ + path  
system.perspective.navigate(page = url)
