Simple experience context links

Greetings. I’ve seen the Kanarra demo, looks great. But in this case I just want to simply be able to ‘click’ the devices on, say, a separate (or not) div or paragraph above or below the main {{page}} to ‘change’ the context experience data of the dashboard to the appropriate device :arrow_heading_down:

What would be the best practice/logical next steps for this? Thanks, :red_circle:

1 Like

Hi @Jose_Cruz,

There are two configuration steps needed to toggle between a device’s context values on an experience page:

1. Create context links within the experience page HTML

Since you are adding these links to the device’s dashboard page, you won’t need to create a new workflow! The HTML link you configure will be the parameter you would like to set. For example, for a device dashboard with a context variable string, a set of page links might look like so:

<div class="context-links">
  <a href="?string=dog">Dog</a>
  <a href="?string=cat">Cat</a>
  <a href="?string=bird">Bird</a>

As a quick tip, configuring for more than one parameter the link would be ?device=the_device_id&string=an_animal.

2. Configure device page dashboard context

Within your dashboard experience page, you will need to configure the dashboard context for your parameters using the {{request.query}} object. Continuing with the above example, the path would be {{request.query.string}}.

And voila, a context menu that can toggle between values, and all without adding a workflow!

Please let me know if you have any additional questions or roadblocks related to this :smile:


1 Like

Ok Julia, some things : 1) I don’t have a separate device dashboard, like the Kanarra demo. I have only one ‘main’ page with a ‘layout’ associated with it. On the layout is where I’m putting the ‘sensors links’ you referenced, as shown here:

As you can see below, I have configured ctx variables in dashboard ‘X’ (let’s call it dashboard X) using these ‘hexID’ tags which each corresponds to each individual sensor:
And which shows as an option in the Experience page:

This way it ‘renders’ the Experience view with Dashboard ‘X’ with default ‘hexID’ = be9c:

If I do the string query as you guided on #2, I get this:
What am I missing, cause definitely I’m missing something :smiley: Thanks, :red_circle:


I think this is related to your response on another thread:

Yes, same as Indicator block and image, I don’t see that option:

Can you provide an example of how one can “pass a [deviceId] property in a [pageData] object” as described above ? Thanks, :red_circle:


Here is the best example of that:

Ok, this was a lot of :hammer:'ing back and forth for a couple of days, but with @JuliaKempf’s original post mixed with @Brandon_Cannaday’s How to get data from a Workflow into a Custom Experience Page post suggested by @anaptfox I got it going :arrow_heading_down:

And is :mage: EXACTLY what I wanted/needed, so thank you. I think I can now safely add an additional title to my collection of :crown: Junior Associate Losant Developer, if y’all don’t mind :smiley: :red_circle: