Forum Discussion

HoneyTurner's avatar
HoneyTurner
Community Member
11 months ago
Solved

Dynamic Slide/Menu Names

I'm creating a course that will be viewed by both American and Canadian users. Along with that comes localized spelling. In order to ensure consistency across versions, I am using the same story file...
  • CharlotteHasler's avatar
    10 months ago

    Hey

    You are right with your idea of a JavaScript trigger, as you can use it to access (and change) the slide names in the menu. 

    Here is an example: 

    let elements = document.getElementsByClassName("linkText");
    
    for (var i = 0; i < elements.length; i++){
    	elements[i].innerHTML = "New Title " + i;
    }

    Result:

     

    To use your specific names you probably have to access each object individually:

    let elements = document.getElementsByClassName("linkText");
    
    elements[0].innerHTML = "This is the first slide/scene name";
    elements[1].innerHTML = "This is the second slide/scene name";
    elements[2].innerHTML = "This is the third slide/scene name";


    Let me know if it solves your problem 🙂