cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

how to make make a variable title for a Master Mashup in Thingworx?

vguevaraperez
11-Garnet

how to make make a variable title for a Master Mashup in Thingworx?

 
1 ACCEPTED SOLUTION

Accepted Solutions

You can use an expression widget with a parameter (titleName) and an expression as follows: (setTimeout(function() { $('title').text(titleName)  },100)) , and trigger it on Mashup Load or at whatever event you want, attached came a mashup with a sample of it working and a text box to dynamically change the page title.

 

View solution in original post

5 REPLIES 5

Can you clarify a bit more the question please. What does you mean on title? a Title on the mashup itself, the browser title,... 

I attach a screenshot of what I want to make a target property of a master (TW Mastert Title.png).

 

Let me explain why I need this, I have a share application for two different plants, let said Plant A and Plant B, bout of them will have the same mashups, same menu and master. Right now the master I have will show in the tab Plant A (title property), but I will like to show Plant B whenever is required. If i can make this property change  by script or make it as a target property, will do the trick. Also the mashups had a property Master, where you specify a default master. I will need make this property be target or change dynamically by script. Let me know if that is possible or if there is another option. 

You can use an expression widget with a parameter (titleName) and an expression as follows: (setTimeout(function() { $('title').text(titleName)  },100)) , and trigger it on Mashup Load or at whatever event you want, attached came a mashup with a sample of it working and a text box to dynamically change the page title.

 

Thank you @CarlesColl, this works, I have it working in my applixcation, (BTW, you forgot to attach the master). 

Uops about the Master, sorry (wasn't needed to test it, but I wanted to make sure it worked with Masters). You can remove it's reference from the XML itself and import the file.

Top Tags