Table of contents

From Redazione
< How it works
Revision as of 11:30, 5 September 2020 by Admin (talk | contribs)
Jump to navigation Jump to search

The system automatically creates a Table of contents for each organization (as well as for all the other pages of this wiki not belonging to an organization) containing the tree of all its subpages, at a location like the following:

https://culturaitaliana.org/wiki/[organization name]/Table of contents

The Table of contents (which can contain an arbitrary number of nested sub-pages) can be interactively edited through the related form (pages can be shown/hidden and rearranged) and is used as reference to create the organization' page on the front-end, which will include all and only the selected pages in the Table of contents on the back-end, in the same order, with a specular navigation panel.

Also, because where the page language is not directly specified on the back-end (for instance through an annotated semantic property, or using the language code suffix on the page title as foreseen by the template Languages) the system will try to detect it using some external libraries, we plan to extend the Table of content's form in order to allow to set the page language through the same form when the language detection has failed (the script has been set to accept only high indexes of confidence, therefore rather than indicating a wrong language, it will omit the information). This way, the menu on the top right on the front-end, allowing to filter the contents by languages, will always contain the complete set of languages, and all the articles in a given language will be included/excluded consistently from the navigation. Below, is the table of contents of the root pages of this wiki, as appears once rendered, and when edited through the related form (by design, it excludes all the organization's related pages).

To be noted that as soon as the number of sub-pages included in the tree exceed 30 or 40 items (where a precise as well as a different threshold is determined by the specificity of the contents) the table of contents has to be split between more than one parent node (and contextually deactivated on the root page) and the current implementation can be easily enhanced to support that.


How it works/Table of contents/Table of contents-screenshot.png

How it works/Table of contents/Table of contents form-screenshot.png