Customizing Presentation > Including Back Buttons in Custom Mashups
Including Back Buttons in Custom Mashups
The back button (Back button. can be included in mashups by adding the Back Button widget. You can see the Back Button widget in use in certain customizable launch point mashups, such as PTC.SCA.SCO.AssetMonitor.AssetList.C_FilterMashup_[ReleaseVersion] or PTC.SCA.SCO.C_ConfigurationAndSetupMashup_[ReleaseVersion].
* 
When viewing or editing mashups that are provided with ThingWorx Apps, click No if presented with a message asking if you want to replace deprecated widgets with new widgets.
PTC recommends including a back button on all pages. This ensures that the back buttons function as users expect them to function.
How the Back Button Works
When a mashup with a back button (Back button.) is viewed, its URL is added to a common list. When the user clicks on the back button, the system checks the list and finds the most recently added URL. The browser is redirected to that URL, and the URL is removed from the list. If the list is empty when a user clicks the back button, then the browser is redirected to the main console page for ThingWorx Apps. Mashups without a back button are not added to the common list.
If a user navigates from a mashup with no back button to a mashup with a back button, the mashup without a back button is not included in the list. When the user clicks the back button, they are redirected to the last mashup URL on the list, rather than to the previous mashup with no back button.
For example, there are four mashups—A, B, C, and D—and all of the mashups include a back button, except for mashup B. The user navigates from A, to B, to C, and then to D. Mashups A, C, and D are added to the list in that order. When the user clicks the back button on mashup D, they are redirected to mashup C. When the user clicks the back button on mashup C, they are redirected to mashup A, not to mashup B. This is because mashup B does not have a back button, so was not added to the list.
Using Back Buttons with Custom Home Pages
If you are using a custom mashup as your home page, rather than the ThingWorx Apps console page, adding a back button to that mashup ensures that its URL is included in the list for back button behavior. When users start from the custom home page, using back buttons from other pages will eventually navigate back to the custom home page.
To include the back button the custom home page mashup, complete the following steps:
1. Edit your custom home page mashup.
2. Add a Back Button widget to the mashup.
3. If you do not want the back button to display when the mashup is viewed:
a. Select the Back Button widget in the Explorer tab or in the Mashup Builder canvas.
b. In the Properties tab, clear the checkbox for the Visible property.
Hiding the back button on your custom home page prevents users from clicking the back button and being redirected to the ThingWorx Apps console page.
4. Click Save to save the custom home page mashup.
Was this helpful?