Teamplaid:cattoc/documentation
This is a documentation subpage for Teamplaid:cattoc. It contains usage information, categories and other content that is not part of the original teamplaid page. |
This module generates a list of linked letters to navigate the pages listed in categories. It uses Mòideal:table of contents.
Ùsaid - Usage
deasaich{{cattoc|key1|key2|...|keyn}}
generates category index keys 1 to n, separated by spaces.
{{cattoc|top=Bàrr}}
generates category index link to the top of the category.
For example, to make a simple alphabet category toc:
{{cattoc|top=Bàrr|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z}}
Bàrr – a b c d e f g h i j k l m n o p q r s t u v w x y z
To make this look much better, and set up the layout as desired, wrap it in a wikitable:
{| class="toc plainlinks" | {{cattoc|top=Bàrr|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z}} |}
Bàrr – a b c d e f g h i j k l m n o p q r s t u v w x y z |
Now you can use wikitable syntax to do whatever you like. (<span class="toc plainlinks"> ... </span> also works as expected.)
Link text
deasaichTo show link text that is different from what is used in the link, use a colon. The text to the left of the colon is the position in the sort order that the link will go to, while the text to the right is what will display: {{cattoc|B¯h:bʰ}}
→ bʰ.
In {{en:ine-pro-categoryTOC}}
, {{cattoc|top=Top|a|b|B¯h:bʰ|d|D¯h:dʰ|e|g':ǵ|g'¯h:ǵʰ|ga:g|G¯h:gʰ|g¯w:gʷ|g¯w¯h:gʷʰ}}
yields Bàrr – a b bʰ d dʰ e ǵ ǵʰ g gʰ gʷ gʷʰ.
Bàrr – a b bʰ d dʰ e ǵ ǵʰ g gʰ gʷ gʷʰ |
This is because in sortkeys for Proto-Indo-European the superscripts ʰ
and ʷ
are converted to ¯h
and ¯w
, and ǵ
with an acute accent is converted to g'
. These replacements are defined in the
part of the data file for Proto-Indo-European (lua
ine-pro
) in Mòideal:languages/datax.