The examples in my last post were very confusing (I used "moduleid" where I should have used "sectionid"). Here is a corrected version:
Links on the TOC to specific modules would have info in them (after a & or ?) that would give placement info. So clicking on a link to the first module in Chapter one would give http://textbook.wikibook.org/en/organic_chemistry_level_1?textbookTOCid=4536...
The textbook name is "organic chemistry level 1" The particular table of contents for this version of the level 1 organic chemistry textbook is identified with the automatic number 4536 (or a unique name; it doesn't really matter). Anybody can build a TOC with different modules and the TOC becomes the organizing structure of that version of the textbook. The other info (sectionid and chapterid) are retrieved from the TOC and advanced as needed as the software keeps track of where the reader is. The actual modules would have been previously associated with particular sections and chapters when the TOC was made.
And the "Next Page" link at the bottom would then be able to know where it was in the order of things and would give: http://textbook.wikibook.org/en/organic_chemistry_level_1?textbookTOCid=4536...
NOTE: The sectionid is now equal to "2."
-- Daniel Mayer (aka mav)
textbook-l@lists.wikimedia.org