how to make make a variable title for a Master Mashup in Thingworx?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
how to make make a variable title for a Master Mashup in Thingworx?
Solved! Go to Solution.
- Labels:
-
Design
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Can you clarify a bit more the question please. What does you mean on title? a Title on the mashup itself, the browser title,...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you @CarlesColl, this works, I have it working in my applixcation, (BTW, you forgot to attach the master).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.