dashboard helper inDashboard improvement

- update method used to retrieve current path to utilize the Request class
- additionally abstracted the function argument accept either a Page object or path