I am wondering how many Lectora users have encountered this scenario during course development (?): You have defined your navigation buttons Next and Back at the title level to Go To the Next Page and Go To the Previous Page, respectfully. And then, on any one particular page, you need your Next Button or your Back Button to go somewhere besides the Next Page or the Previous Page? As an Accessibility Content Developer, this occurs quite frequently, as we are branching to different pages based on Accessibility needs of the user. In order to do this in Lectora can actually involve a bit amount of work. Though we have the ability to remove the inheritance of the Next or Back button on any particular page and then define a new Next or Back button on a particular page with a different navigation action, this only address part of the problems involved in doing this. One of the issues with this method is the tab order. If I remove the inheritance of the Back button on a particular page, and then define a new Back Button with a new navigation action on the page, the tab order of the new Back Button will probably NOT be the same as the inherited navigation, hence, I may have to remove the inheritance of several buttons and place new buttons on the page to keep the tab order correct. In addition, I may have swipe actions, keystroke actions, etc also defined at the title level to Go To Previous Page and all of these actions must also be removed from inheritance on a particular page and redefined on that page.
The first thing I do is create two action groups at the title level. I call them Next Button Default Action Group and Back Button Default Action Group. In the Next Button Default Action Group, I have one action, which is, Go To Next Page. In the Back Button Default Action Group, I have one action, which is, Go To Previous Page. These are the default actions that I want my Next and Back Button to have.
At the title level, I set up two actions. One action is called “OnShowRunJS Map Permanent Key Named Next to Next Button Default Action Group”, the second action is called “OnShowRunJS Map Permanent Key Named Back to Back Button Default Action Group”.
Again, ‘next’ is the permanent name we are using for the Next Button Action Group we are currently calling, set up in the mapActionGroup() function.
This is the default set up for the title. Now, when you go to any page in the title and click the Next button ( or do a Left Swipe on a tablet or hit a keystroke command for the Next button) , it will go to the Next Page in the title, and the Back button will go to the Previous Page in the title.
Now, what do we do if we want to override, say, the Next Buttons action on any one particular page to do something else besides Go To Next Page.
See the sample course, my library object and documentation.