Mall:TähestikTOC

Allikas: Vikipeedia
Jump to navigation Jump to search
Sisukord: 0–9 A B C D E F G H I J K L M N O P Q R S Š Z Ž T U V W Õ Ä Ö Ü X Y
AlgusesseVaata kaViitedVälislingid


Template-info.svg Malli dokumentatsioon
Malli tuleb tõlkida ja kohandada!

Kasutamine[muuda lähteteksti]

Lisa {{TähestikTOC}} artiklisse kohta, kuhu soovid tekitada sisukorda. Loendites võid lisada sisukorra nii loendi algusesse kui lõppu.

Parameetrid[muuda lähteteksti]

Toggling the style and display of elements within the TOC is accomplished by adding parameters with a null value (in the form |parameter=|). This is a short list which will be expanded upon further in the following text:

  • block v. inline formatting: mitmerealine, nobreak;
  • table alignment: align;
  • addition of prefixes to the links: prefixLink, prefixDesc;
  • suppressing the automatic table of contents: notoc; and,
  • each of the links also has its own parameter which when used suppresses the display of the link.

Block and inline formatting[muuda lähteteksti]

When the template is used without any parameters, it appears as:

Sisukord: 0–9 A B C D E F G H I J K L M N O P Q R S Š Z Ž T U V W Õ Ä Ö Ü X Y
AlgusesseVaata kaViitedVälislingid

This replicates what you would see with a template like {{CompactTOCrefs}}. The templates {{CompactTOC2}}, {{CompactTOC5T}}, and {{CompactTOCrefs2}} display the text in a single inline list. To accomplish this, add the parameter nobreak to the template:

 {{TähestikTOC|
     nobreak=|}}
Sisukord: 0–9 A B C D E F G H I J K L M N O P Q R S Š Z Ž T U V W Õ Ä Ö Ü X Y AlgusesseVaata kaViitedVälislingid


For a TOC which displays in a block format, like {{CompactTOC4}} and {{CompactTOC5}}, add the parameter mitmerealine:

 {{TähestikTOC|
     mitmerealine=|}}
Sisukord 0–9 A B C D E F G H I J K L M N O P Q R S Š Z Ž T U V W Õ Ä Ö Ü X Y AlgusesseVaata kaViitedVälislingid


Note: If these parameters are used in combination, mitmerealine will always override any effects from nobreak.

Sisukorra joondamine[muuda lähteteksti]

As is apparent from the examples already given, the natural state of the TOC is to appear along the left side of the page without any alignment. Some of the existing TOCs, including {{CompactTOC}}, {{CompactTOC3}}, and {{CompactTOCrefs}}, are aligned to the center of the page. This can be replicated by adding the parameter align with a value of 'center':

 {{TähestikTOC|
     align=center|}}
Sisukord: 0–9 A B C D E F G H I J K L M N O P Q R S Š Z Ž T U V W Õ Ä Ö Ü X Y
AlgusesseVaata kaViitedVälislingid

The TOC may also be aligned to the right or the left, causing the article text to wrap around it, but floating the TOC is generally discouraged. Guidelines may be found at Wikipedia:Section#Floating the TOC.

Prefixing links or link descriptions[muuda lähteteksti]

The TOC templates {{CompactTOCprefix}} and {{CompactTOC2wprefix}} include the ability to add a prefix to the link with or without displaying it in the TOC. This can also be accomplished with this template by using the parameters prefixLink and prefixDesc; the former adds the prefix to the actual link, and the latter adds the prefix to the text displayed on the page. Examples:

 {{TähestikTOC|
     prefixLink=1.|}}
Sisukord: 0–9 A B C D E F G H I J K L M N O P Q R S Š Z Ž T U V W Õ Ä Ö Ü X Y
AlgusesseVaata kaViitedVälislingid
 {{TähestikTOC|
     prefixLink=hidden|
     prefixDesc=visible|}}
Sisukord: visible0–9 visibleA visibleB visibleC visibleD visibleE visibleF visibleG visibleH visibleI visibleJ visibleK visibleL visibleM visibleN visibleO visibleP visibleQ visibleR visibleS visibleŠ visibleZ visibleŽ visibleT visibleU visibleV visibleW visibleÕ visibleÄ visibleÖ visibleÜ visibleX visibleY
AlgusesseVaata kaViitedVälislingid
 {{TähestikTOC|
     prefixDesc=+ |}}
Sisukord: +0–9 +A +B +C +D +E +F +G +H +I +J +K +L +M +N +O +P +Q +R +S +Z +T +U +V +W +X +Y
AlgusesseVaata kaViitedVälislingid


Suppression of the normal TOC[muuda lähteteksti]

In the cases where it might not be desirable to suppress the automatically generated table of contents this template uses the parameter notoc to prevent suppression. If you want to allow the software to generate a table of contents, use the following:

 {{TähestikTOC|
     notoc=|}}

Eemaldatavad lingid[muuda lähteteksti]

Need lingid eemaldatakse tähtede alt kui see on lisatud. One of the reasons for having so many different versions of CompactTOC has been that some articles do not have a 'References' section, or the TOC is being used for a list contained within a larger article. This template solves the problem by providing a parameter for each link to be removed. They are as follows:

  • numbrid: removes the numbers link
  • a, b, etc.: removes the link for that letter; alternatively it can be used to create unlinked letters (see example below)
  • alajaotused: eemaldab kõik lingid tähtede all
  • algusesse: eemaldab lingi 'Algusesse'
  • vaataka: eemaldab alajaotuse lingi 'Vaata ka'
  • viited: eemaldab alajaotuse lingi 'Viited'
  • välislingid: eemaldab alajaotuse lingi 'Välislingid'

Some examples:

 {{TähestikTOC|
     numbrid=|
     alajaotused=|}}
Sisukord: A B C D E F G H I J K L M N O P Q R S Š Z Ž T U V W Õ Ä Ö Ü X Y
 {{TähestikTOC|
     numbrid=|
     i=|
     n=|
     x=|
     z=|
     viited=|}}
Sisukord: A B C D E F G H J K L M O P Q R S Š Ž T U V W Õ Ä Ö Ü Y
AlgusesseVaata kaVälislingid
 {{TähestikTOC|
     numbrid=|
     i=I|
     j=J|
     v=V|
     x=X|
     nobreak=|
     algusesse=|}}
Sisukord: A B C D E F G H I J K L M N O P Q R S Š Z Ž T U V W Õ Ä Ö Ü X Y Vaata kaViitedVälislingid
 {{TähestikTOC|
     mitmerealine=|
     align=center|
     g=|
     vaataka=|
     välislingid=|}}
Sisukord 0–9 A B C D E F H I J K L M N O P Q R S Š Z Ž T U V W Õ Ä Ö Ü X Y AlgusesseVaata kaViitedVälislingid


Optional user defined section links[muuda lähteteksti]

Optional section links may be defined using the parameters alajaotus1, alajaotus2, alajaotus3, alajaotus4, and alajaotus5, as follows:

 {{TähestikTOC|
     numbrid=|
     vaataka=|
     välislingid=|
     alajaotus1=lisab alajaotuse|
     alajaotus2=veel ühe|}}
Sisukord: A B C D E F G H I J K L M N O P Q R S Š Z Ž T U V W Õ Ä Ö Ü X Y
Algusesselisab alajaotuseveel üheViited