Basically this function now works with a few caveats i have to fix somehow.
lastPageVisited = VarSummaryGoBack.getValue().toLowerCase().replace(/\s+/g, ‘_’);
//lastSectionVisited = VarLastSectionName.getValue().toLowerCase().replace(/\s+/g, ‘_’);
lastChapterVisited = VarLastChapterName.getValue().toLowerCase().replace(/\s+/g, ‘_’);
constructedPageName = lastChapterVisited+”_”+lastPageVisited+”.html”;
I only have Chapters in my title, so no need for the Sections.
In any Chapters or Sections you need to have an action setting the LastChapter/LastSection variable.
Issues i would need to solve.
– When you have pages outside Chapters and Sections i do have to find a solution for that. Probably nulling it.
– When using shortnames when publishing, i dont have a clue about the pageNames, have to test that… and figure out how to check and process that.
– Not sure how Tests are working. Would need to check that.
– All now in Lectora Online, have to see if there is a difference when using it in Inspire or Publisher
Quickly did a testrun with publishing as Short-ID named, and that looked promising. I do think Lectora uses the earlier mentioned CurrentPageId to create names for the pages. Something like pageCurrentPageId. So setting your publishing to Short-ID probably simplifies things…no need for worrying about Chapters and Sections..just add the CurrentPageId and your good..
Testing that now.
- This reply was modified 2 years, 2 months ago by Math Notermans.