Dynamic Buttons

June 11th, 2020

The following code shows how to add a button to link to an external URL

<a id="4b079dec-2665-47d0-ad70-efaf380b9b24" style="position: absolute; left: 644px; top: 348px;" href="https://www.google.com" target="_blank" class="md-button md-raised md-accent" md-ink-ripple="">Button Text</a>

Button Links to a specific page in the MangoUI based on what watch list parameter is selected on the page.

The ui-state name for the page can be seen in the menu editor

<md-button id="cd4e96ca-a9b8-48b8-a333-63ab36d14bee" class="md-button md-raised md-accent" ui-state="'ui.hvacSystems.rooftopUnits.rooftopUnit'+ designer.parameters.dn.substr(3,1)" style="position: absolute; left: 9.234px; top: 253px; width: 115.766px; height: 36px;">Rooftop Unit noparse_b7604890adbdeba8075df7aab41b9092</md-button>

Linking to a specific page and passing a Watch List Parameter

This requires that your page is set up to accept the incoming parameter as discussed here

<md-button id="cd4e96ca-a9b8-48b8-a333-63ab36d14bee" class="md-button md-raised md-accent" ui-state="'ui.hvacSystems.vavDashboard'" ui-state-params="{dn:'VAV201'}" style="position: absolute; left: 79.2188px; top: 103px; width: 115.766px; height: 36px;">Link Text</md-button>

Copyright © 2024 Radix IoT, LLC.