Модуль:category tree/doc

Wiktionary дан

This is the documentation page for Модуль:category tree

Бул модулда категория шаблонго үлгүлөрүн жаратуу үчүн колдонулат. Бул түздөн-түз пайдалануу үчүн арналган эмес. Тескерисинче, ар бир үлгүсү деп Калып өзгөчөлүктөрүн тейлеген өз суб модулу, ээ болот.

Бул документтешитирүү гана категория дарак системасынын генерик камтыйт. Эгер белгилүү бир шаблон тууралуу, же кошуп же категория маалыматтарды өзгөртүү кантип документтерди издеп жаткан болсо, ошол үлгүсү документтерди карагыла.

Параметрлер[түзөтүү]

категория дарак модулу катары кылынса:

{{#invoke:category tree|show|template=name of the template|...other parameters...}}

бул модулду колдонгон ар бир шаблон шаблон= параметр берилген аты Бул модулдан турган субмодулду болушу керек. Бул субмодулу бир параметр ашат деген милдетти экспорттоо керек: адегенде калып кабыл алынган ар кандай параметрлерди камтыйт үстөл деген маалымат. параметрлерин айкалышы (б.а. эч кандай категория бар) туура эмес болсо, бул милдетти бир жаңы категория объект ошол параметрлерин өкүлү, же nil нөлгө барабар болууга тийиш.

Көпчүлүк үлгүлөрүн кабыл алуу жана параметрлерин бул жалпы комплексин өтөт. калыбы боюнча модулду өткөн параметрлери ар бир шаблон сөзсүз Булардын баары колдоно турган эмес, ошондуктан, ал шаблону менен өз-өзүнчө аныкталат. {{famcatboiler}}, мисалы, бир гана модулда code= параметрин өтөт.

code=
калыптык анын мазмунун 'ээлик' көрсөтүлгөн коду. Бул, адатта, Эн сыяктуу тил коду, ал эми ошол эле учурда белгилүү бир шаблон аны ыйык тутпаса, кантип жараша тил үй-Latn сыяктуу же коду бир скрипт коду, болушу мүмкүн.
label=
категорияланган жаткан иш үчүн аты-жөнү. суб модулда белги чечмелеп кантип аныктайт, ошондуктан шаблон колдонулган көз каранды. Көп үлгүлөрүн башка кандайдыр бир тил коду катары чечмеленет мүмкүн, ал эми үстөлдүн маалыматтарды карап үчүн колдонушат.
sc=
буюмдарды скрипт коду бөлүштүрсөк болот. Бул, адатта, бош эмес, ал эми кытай тарабынан колдонулган көптөгөн категориялар алиппесине негизделген Биики ыскылаакка бөлүүгө болот.

Жалпы иштеп чыккан[түзөтүү]

Модулу категориядагы эки негизги түрлөрүнүн негизинде жүзөгө ашырылат:

Basic categories are those for which the code= parameter is not empty. These therefore belong to a specific language (or similar) and are the "regular" categories. Examples are: Category:English nouns, Category:French templates, Category:nl:Linguistics, Category:Япон алынган англисче терминдер, Category:Латын жазуусу белги.

Umbrella categories do not have a code, but contain all basic categories of their label, one for each code. These are the "by language" type categories. Examples are: Category:Nouns by language, Category:Templates by language, Category:Linguistics, Category:Terms derived from Japanese, Category:Characters by script.

Some templates also distinguish a third type of category, the fundamental category. This category is used as the parent category for umbrella categories.

Category objects[түзөтүү]

Бул документтешитирүү эскирген.
Бул баракта же бөлүгү боюнча документтер мындан ары анын учурдагы абалын чагылдырган, ал эми кээ бир маалымат жок же туура эмес болушу мүмкүн. мындан ары колдонулуучу маалыматтарды алып, ал эми маянасы өзгөчөлүктөрү жөнүндө this page, жана кошумча маалымат түзөтүп, жардам берчи.

Category objects are returned by each submodule's new function. They represent a single category in the tree. A category object has a variety of methods which may be called on it to ask for information about the category.

getBreadcrumbName[түзөтүү]

getBreadcrumbName()

Returns the name that is used for the category in the "breadcrumbs" at the top of the category page.

getDataModule[түзөтүү]

getDataModule()

Returns the name of the module which contains the data for this category. This is used to create an "edit" link on the category, which allows users to find and edit the information more easily.

getCategoryName[түзөтүү]

getCategoryName()

Returns the name of the category that this category object represents.

getDescription[түзөтүү]

getDescription()

Returns the description text that is shown at the top of the category page. If the category has no description, this returns nil.

getParents[түзөтүү]

getParents()

Returns a table of the parent categories of this category. Each element in the table is a table itself, with two elements:

.name
One of two possibilities: An category object representing the parent category, or a string that directly specifies the name of the parent category.
.sort
The sorting key that should be used when categorizing the current category in the parent.

If the category has no parents, this returns nil.

getChildren[түзөтүү]

getChildren()

Returns a table of the child categories of this category. Each element in the table is a category object representing the child category. If the category has no children, this returns nil.

getUmbrella[түзөтүү]

getUmbrella()

Returns a category object for the current category's corresponding umbrella category. If the current category is already an umbrella category, this returns nil. It also returns nil if the category has no umbrella category.