Lectora Hacks: Take Me Back (Even If I Wander)
Hack: save a bookmark for a page in a course and then jump back to that page later, from anywhere else in the course.
Why I needed this hack:
I wanted a student to be able to launch into a set of branch-out pages from anywhere in the course; and then give them a button to go back to where they left off after a wander through the branch-out pages.
There are three parts to this hack:
Create a new variable to store the "hold my place" bookmark.
On the button which takes you to the branch-out pages, add an action to store the current location in the new variable.
In the branch-out pages, provide some sort of "take me back" navigation using the bookmark.
Pretty straightforward stuff, right?
Here's how it's done (and if you're struggling with this, don't worry, we can do it for you!)
Optional Step 2a
You can add another action to store the CurrentPageName into a variable (say BookmarkTitle) which you can use to display the plain language name of the page you came from to the user. Bear in mind that the contents of BookmarkBack won't be very readable, particularly if you choose "Convert page names to short ID-based names" when you publish. In that case, html names of published pages look something like page73645.html.
trivExitPage( VarBookmarkBack.getValue() , true );
Optionally, you could also maintain a second variable to bookmark your place in the break out page list and provide a way to jump back and forth between parallel tracks.
That's it! Publish and enjoy. Whichever page you branch out from, and however much you wander in the meantime, when you kick off the "take me back" action you will go back to the page you came from.