Module:Pg/doc

E Wikisource

How it runs[recensere]

The template works into nsPage, and it builds a link to appropriate nsPage (from nsPage) or ns0 (when use or transcluded into a namespace different from nsPage) using the original number of page, as it is printed in original edition. When the original index of edition refers to multiple volumes, an additional parameter must be added to point the link to appropriate volume.

Needed data must be stored into a special, index-related Lua repository.

Parameters[recensere]

1: original number of page 2: alternative text to be shown as link text (optional) 3: base name of appropriate index page (an abbreviation can be stored and used)

Example[recensere]

Let's examine a complex edition: Cronica (Salimbene de Adam), coming from two index pages:

At the bottom of volume II, you can find lots of pages (a glossary and an index of names) with thousands of links.

Here the wikicode of a fragment of a page:

* Aaron, fratello di Mosé, {{Pg|26||cron1}}, {{Pg|153||cron1}}

Here its parsed output:

  • Aaron, fratello di Mosé, 26, 153

As you see, links point to ns0 pages of the work here (since they are not working in nsPage namespace); if you navigate to nsPage, the same code points to two pages of volume I of the book.

Needed data are saved into pages, two Lua Module:Dati/Salimbene de Adam – Cronica, Vol. I, 1942 – BEIC 1910163.djvu and Module:Dati/Salimbene de Adam – Cronica, Vol. II, 1942 – BEIC 1912533.djvu.

This is the documentation page for Module:Pg