ထႅမ်းပလဵတ်ႉ:Subjects/2
This template is used on a very large number of pages. To avoid large-scale disruption and unnecessary server load, any changes should first be tested in the template sandbox or a user subpage. The tested changes can then be added in one single edit to this template. Please consider discussing any changes on the talk page before implementing them. |
This is one of a series of sub-templates of {{subjects}} that add the current page to allbooks categories.
လွင်ႈၸႂ်ႉတိုဝ်း
မႄးထတ်းThere are three required parameters and two optional. One of the required parameters may be blank.
ping
— Optional. If non-blank, this template is only being called to make sure it exists.subject
— Required. Names a subject to whose allbooks category this page should be added.origin
— Required. Names the previously visited subject, if any, which provided the value forsubject
; may be blank.n
— Required. An integer that names this template. The first template in the series is called 0, the second is 1, and so on.diagnose
— Optional. If non-blank, diagnostic messages are provided when errors are detected, together with suggestions to fix the problem and buttons to act on the suggestions.
If ping
is non-blank, this template simply returns "ping" without doing anything else. This makes it possible for each template in the series to look for the next template in the series without using expensive parser function {{#ifexist:}} (instead, simply ping the next template and compare the result to "ping").
Otherwise, this template first requests the current page be added to the allbooks category associated with ပၢႆး:subject
, via {{Subjects/allbooks}}. Then it checks to see whether the subject page itself exists and is suitably formatted for extraction of its parent parameters. If all is well, it extracts the parent parameters from the subject page, and passes each of them in turn to the next sub-template in the series. Otherwise, it adds the current page to Category:တိုၵ်ႉလူဝ်ႇဝႆႉ လွင်ႈသူၼ်ၸႂ် (ပပ်ႉတင်းသဵင်ႈ), and if in addition diagnose
is non-blank, also calls {{subjects/diagnose subject}}.
When calling the next template in the series, the identity of the next template is determined via {{subjects/name next}}, which detects when there are no more templates available in the series and in that case diverts the call to {{subjects/upper bound}}.
တူၺ်းပႃး
မႄးထတ်း- {{subjects/leaf}}