Table of contents

From Redazione
Jump to navigation Jump to search
Line 1: Line 1:
The system automatically creates a Table of contents for each organization (as well for to other sets of pages containing a [[Template:Form TOC|template TOC]]) containing the tree of all its sub-pages, at a location like the following:
+
The system automatically creates a Table of contents for each organization (as well for any other set of pages which includes a [[Template:Form TOC|TOC template]] on top of it) with the tree of all its sub-pages, at a location like the following:
  
 
<pre class="language-xxxx">
 
<pre class="language-xxxx">
Line 5: Line 5:
 
</pre>
 
</pre>
  
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's page on the front-end, in such a way that it includes only the pages selected in the TOC and in the desired order, together with a specular [[How_it_works/Front-end_features#Side panel with table of contents|navigation panel]].
+
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 a reference to display the organization's pages (which could be also called "site") on the front-end, in the desired order, with only the desired pages, and in a way that they can be easily navigated, both through previous/next buttons below each page, and through a side [[How_it_works/Front-end_features#Side panel with table of contents|navigation panel]].
  
Currently (November 2020) the system is designed in such a way that a TOC can be put within any set of pages a data consumer wants to display on any front-end, and is not limited to the pages of the organizations themselves. We plan to use such feature, for instance, to create a directory of authors and books, either with a general TOC, or (preferably, as the number of authors and works grows) with a TOC for each author (a general TOC, however, might coexist with others specific, provided that the queries are handled correctly through the [[How it works/APIs]], while an optimal solution for a data consumer who wants to display a page with all the authors and their books, at the same time keeping the individual TOCs of a manageable size on the back-end, would be just to retrieve all the required specific TOCs, and then to combine them together either in "realt-time" or with some pre-processing operation).
+
Currently (November 2020) the system is designed in such a way that a TOC can be put within any set of pages intended to be displayed on any front-end, and is not limited to the pages of the organizations themselves. We are using such feature, for instance, to populate a directory of authors and open-source books, currently using a [[Digital_library/Authors/TOC|general TOC]], but as soon as the number of authors grow, the TOC can be split simply creating a TOC on top of each author and then programmatically recomposed if a data-consumer wants to display all the authors and all the works of them in a single-page application: which should be discouraged both because writers tend to be prolific, once they reached a perfect command over the language of their mind, and, I would say, even before, <!--at the expense of the reader, who will forgive only because that was preparation of those results-->to achieve that level – and because authors are expected to be different each other.
 +
<!-- either with a general TOC, or (preferably, as the number of authors and works grows) with a TOC for each author (a general TOC, however, might coexist with others specific, provided that the queries are handled correctly through the [[How it works/APIs]], while an optimal solution for a data consumer who wants to display a page with all the authors and their books, at the same time keeping the individual TOCs of a manageable size on the back-end, would be just to retrieve all the required specific TOCs, and then to combine them together either in "real-time" or with some pre-processing operation). -->
 
<noinclude>
 
<noinclude>
 
Also, because where the page language is not directly specified on the back-end (for instance through an [https://www.semantic-mediawiki.org/wiki/Help:Setting_values annotated semantic property], or using the language code suffix on the page title as foreseen by the [https://www.mediawiki.org/wiki/Template:Languages template Languages] --- ***Attention, currently, on November 2020, we are not using such methodologies, and management of multiple languages might have to be adjusted to fit all needs) the system will try to detect it using some [[How it works/Technology_we_use|external libraries]], we plan to extend the Table of content's form in order to allow to set the page language through its related 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 [[How_it_works/Front-end_features#Selection of contents with multiple languages|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.
 
Also, because where the page language is not directly specified on the back-end (for instance through an [https://www.semantic-mediawiki.org/wiki/Help:Setting_values annotated semantic property], or using the language code suffix on the page title as foreseen by the [https://www.mediawiki.org/wiki/Template:Languages template Languages] --- ***Attention, currently, on November 2020, we are not using such methodologies, and management of multiple languages might have to be adjusted to fit all needs) the system will try to detect it using some [[How it works/Technology_we_use|external libraries]], we plan to extend the Table of content's form in order to allow to set the page language through its related 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 [[How_it_works/Front-end_features#Selection of contents with multiple languages|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.

Revision as of 18:14, 27 December 2020

The system automatically creates a Table of contents for each organization (as well for any other set of pages which includes a TOC template on top of it) with the tree of all its sub-pages, 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 a reference to display the organization's pages (which could be also called "site") on the front-end, in the desired order, with only the desired pages, and in a way that they can be easily navigated, both through previous/next buttons below each page, and through a side navigation panel.

Currently (November 2020) the system is designed in such a way that a TOC can be put within any set of pages intended to be displayed on any front-end, and is not limited to the pages of the organizations themselves. We are using such feature, for instance, to populate a directory of authors and open-source books, currently using a general TOC, but as soon as the number of authors grow, the TOC can be split simply creating a TOC on top of each author and then programmatically recomposed if a data-consumer wants to display all the authors and all the works of them in a single-page application: which should be discouraged both because writers tend to be prolific, once they reached a perfect command over the language of their mind, and, I would say, even before, to achieve that level – and because authors are expected to be different each other.

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 --- ***Attention, currently, on November 2020, we are not using such methodologies, and management of multiple languages might have to be adjusted to fit all needs) 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 its related 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).

Here is an example of a TOC (without nested pages) once rendered

And here of a TOC while edited through the related form (items can be rearranged and selected/deselected, and that will be matched on the front-end)

Here is an example of a more complex TOC, with nested pages


and when edited through the related form

How it works/Table of contents/TOC example 4.jpg


(nested pages can be rearranged on the same level only)