How do you link to another page on an SP widget?

Joey Wan Kenobi
Tera Guru

I am trying to set up a widget where there is a button/link at the bottom that will bring the user to another page.

I've seen this in a standard angular app, but I am having trouble understanding how to do it within the confines of SN.

The first page (the home page) contains a list of incidents. I want to have a button that will bring the user to a different list. Perhaps i don't need to load a new page, but the ability to load a new widget. Either way, Id like for the user to simply see the list change (the other list will have some functionality built into it which is why i was going the route of a new page/widget).

Any help would be appreciated.

2 REPLIES 2

anurag92
Kilo Sage

If you see the OOB Simple List widget, you will understand how the URL is constructed in Server Script, and in controller it is redirected using $location.



If the location/page where you need to redirect is fixed you can directly embed it in HTML code as this:



<a id="my_button" class="button" type="button" ng-click = testMe() ng-href="https://dev24859.service-now.com/csm?id=csm_ess_view">New Page


  </a>



In order to give the user an experience that he is not actually being redirected to a new page, keep the structure of target and source page common. Look at the below example,   I am just redirecting from one of the widgets and keeping few widgets common, this would prevent a page redirection experience.



find_real_file.pngfind_real_file.png



Hope you get the idea.


Interesting. I had the button go to a fixed link (another sp page). it doesn't seem as responsive. That might be because the second page loads a lot of data though.



Also, I found that the pages dont seem to be linked in this way.



On Page 1 it shows "Home > Page 1"


On Page 2 it shows "Home > Page 2"



Ideally, I'd like to have


On Page 1 "Home"


On Page 2 "Home > Page 2"