cancel
Showing results for 
Search instead for 
Did you mean: 

Move UI toggle button into template to which the ViewModel does not apply its bindings.

slyakh
Participant
0 Kudos

What I'm trying to do on the UI -
Move or duplicate the UI toggle button outside of the user page (so, into another template, like MainMenu) (we had to hide user page to prevent changes to date formats and other fields, which affect how data is exported and potentially other processes😞

The issue I'm running into -
The button uses a data-bound function, and each template has bindings applied (using element Id) from a different ViewModel.

Since we can't edit the js files to apply the binding to an additional element, what are my options?

  1. Changing target template's main div's id was a bad idea.
  2. Wrap new button in div with same id as source template?
    - I hear duplicate id's are bad.
    - Would the 2 ViewModels interfere with each other? If so, can the main one be paused or cleared for only the added button element?
  3. Should I try to recreate that part of the ViewModel in a <script> tag within the target template?
  4. Something else?

Thank you.

slyakh
Participant
0 Kudos

Not sure why the first image isn't displaying in the post...

Accepted Solutions (0)

Answers (0)