Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Utilize the Menu Widget to navigate between multiple Mashups.
Frequently, your application needs to display more information than can comfortably fit on a single page, but manually linking to multiple Mashups can be tedious.
Instead, you can utilize a Menu Entity, Menu Widget, and a Master Mashup to provide consistent navigation between all the pages of your application.
NOTE: This guide's content aligns with ThingWorx 9.3. The estimated time to complete this guide is 30 minutes
In this guide, we'll assume a scenario where you're an application designer for LightCo, a company that designs and sells smart, connected street, interior, and other lighting products.
In particular, LightCo is interested in using ThingWorx Foundation to operate and control lighting for industrial and city applications.
There's a tentative deal in the works with a city park replacing all their path lighting with high-efficiency models. There's also an outdoor amphitheater in the park that could be added to the deal if the functionality to properly control it is present.
LightCo's intention is to use Foundation to provide a level of control for this application that otherwise wouldn't be possible, as a differentiator versus the competition bidding on the same project.
Since control of both the park-lighting and amphitheater lighting needs to be separate, putting both controls on the same Mashup page would not only be counterintuitive but could possibly lead to errors.
So, in this guide, we'll setup our base page layout for this lighting application. We'll create both a homepage (where we could add login or other elements), as well as separate pages for the park vs the amphitheater. We'll then create a Master Mashup with a Menu for easy navigation between these three initial pages.
First, we want to create a Mashup to represent our homepage.
There doesn't have to be much to it, as we could come back later to develop it further. We just need it to be pre-created to later include it in our Menu.
As mentioned, we don't really want to design our final Homepage right now. Instead, we're simply getting it started to leave ourselves a relatively blank canvas that we can utilize later.
Still, we need to add something. If nothing else, we need something that we can see so that we know we're on the correct page when we click through our Menu options.
We know we'll want our company's name, i.e. LightCo, and probably an image, login, or something else below. So let's subdivide the Mashup into a smaller top part for the name and a bigger bottom section for future functionality.
In the top section, we'll add a Label Widget for our company's name.
Now that we have a basic LightCo homepage in-place, we need subpages to separately control the park-lighting vs the amphitheater-lighting.
But, yet again, we're not designing the actual pages yet. We're just creating them so we can reference them in a Menu.
An easy way to create additional Mashups that have similar layouts is with the Duplicate action. We'll do so now.
Since we used Duplicate to clone the homepage, we see the same header/page Layout which we previously designed. That Layout can be useful for separating page-titles from functionality, so let's keep it.
But we also see the LightCo LabelText we previously created. Since this is the Park Lighting Control page, we need to change it.
In the same way that we used Duplicate to mirror the homepage into a park-lighting page, we'll now do the same for the amphitheater-lighting page.
Just as we did with the Park Lighting Control LabelText, we now want to change this duplicate to read Amphitheater Lighting Control.
Having created all three of our starting Mashups, we'll now create a Menu Entity which provides links to each of them.
We'll be able to use this Menu Entity later to configure a Menu Widget for navigation.
Now that we have created the Menu Entity, we can add Menu Definitions with links to all the previously-created pages.
Click here to view Part 2 of this guide.