Book module for Allmice CMS

Title: Book module
Description: This module provides link sets for Page module items to group the pages together and to be consecutively browsable like book pages are. The type of the link set can be entered as a snippet code and the module replaces it with corresponding link set.
Current version download link: click here to download Allmice CMS Book module

Instructions for Book module

This Book module can be used to add easy consecutive navigation links to pages and contents with links to pages, which are considered as a group of consecutive pages (a Book).
The Book module needs Page module to be installed. Book module navigation links can be added to pages using snippets (PHP code global sort of snippets).
To use Book module functionality, you should prepare navigation links and add corresponding snippets to every page, where you wish navigation links to be displayed.

The easiest way to prepare navigation links, is to use add, edit and editNaviTitles methods of the Book module.

Possible snippets
Possible snippets, which you can add to pages and which will be replaced with book content, are:
[bookNavi]: previous and next links to consecutive pages in relation to current page;
[bookContent]: links to all pages in book in consecutive order;
[bookSet]: a template, which can be changed as a configuration entry - a combination of other snippets;
[bookOther1]: custom text or custom HTML code (can be changed as a configuration entry);
[bookOther2]: another custom text or custom HTML code (can be changed as a configuration entry);
[baseUrl]: base URL of the website (Book module links do not need it, but Book module can be used to replace such tokens, where it is needed, for example in WYSIWYG editor's anchor and img tags.).

Alternative way to prepare navigation links:

In first versions of Book module there were no add, edit and other such easy methods and navigation links were prepared for books using following alternative way.
This alternative guide also explains the database structure for Book module data.

Entries for every page in core_misc_data table
For every page, which will be part of the book, there must be made an entry into core_misc_data table, where column values are following:
integer_value: [current book id];
module_name = "Book";
uri: some descriptive unique string like title of the current page;
type = "naviData";
value: id values separated by commas, which are specifying the sequence, what are previous and next pages to the current page ([previous page id],[current page id],[next page id]).

Content entry in core_misc_data table
There must be made an entry into core_misc_data table for content too, where column values are following:
integer_value = 0;
module_name = "Book";
uri = "contentLinks";
type = "contentData";
value: page id values separated by comma (in addition first and last value must be 0), which are representing the order, how the page links will appear in content list (e.g. "0,5,3,4,8,0").

How to prepare entries?
You can prepare such entries as a TSV table using a spreadsheet program and then entering the TSV table into database using addEditTsvSet method of SystemManager module ([baseUrlOfYourWebsite]/system-manager/add-edit-tsv-set).