# Getting Current user route and path

**URL:** <https://meta.discourse.org/t/getting-current-user-route-and-path/56723>\
**Category:** Development\
**Created:** [1 Febbraio 2017, 5:17pm UTC](https://meta.discourse.org/t/getting-current-user-route-and-path/56723 "2017-02-01T17:17:00Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Alavi1412](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alavi1412/32/67721_2.png) [@Alavi1412](https://meta.discourse.org/u/Alavi1412)\
**Post date:** [1 Febbraio 2017, 5:17pm UTC](https://meta.discourse.org/t/getting-current-user-route-and-path/56723/1 "2017-02-01T17:17:00Z")

</div>

**Is there any way to find the current route of user?**

for example if **user is watching** homepage it return something like `homepage`.

or if **user is watching** a category with id of 52 (just an example) it returns `category 52` or something similar to this to distinguish where the user is.

(I want this for creating a very dynamic widget and it should provide different menu on each page)  
(and I don’t want to use `window.location.href` because url differ from each site to another and I want to create a widget for all discourse sites)

---

_[View the full topic](https://meta.discourse.org/t/getting-current-user-route-and-path/56723)._
