Templat:Namespace detect: Perbedaan antara revisi
Tampilan
Konten dihapus Konten ditambahkan
kTidak ada ringkasan suntingan |
Migrasi templat ke modul menggunakan bahasa pemrograman Lua. |
||
(9 revisi perantara oleh 9 pengguna tidak ditampilkan) | |||
Baris 1: | Baris 1: | ||
{{SAFESUBST:<noinclude />#invoke:Namespace detect|main}}<noinclude> |
|||
{{#switch: |
|||
{{lc: <!--Lower case the result--> |
|||
<!--If no or empty "demospace" parameter then detect namespace--> |
|||
{{#if:{{{demospace|}}} |
|||
| {{{demospace}}} |
|||
| {{#ifeq:{{NAMESPACE}}|{{ns:0}} |
|||
| main |
|||
| {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}} |
|||
| talk |
|||
| {{NAMESPACE}} |
|||
}} |
|||
}} |
|||
}} |
|||
}} |
|||
<!-- Only one of the lines below will be executed --> |
|||
<!-- Respecting empty parameters on purpose --> |
|||
| main = {{{main| {{{other|}}} }}} |
|||
| talk = {{{talk| {{{other|}}} }}} |
|||
| user = {{{user| {{{other|}}} }}} |
|||
| wikipedia = {{{wikipedia| {{{other|}}} }}} |
|||
| file |
|||
| image = {{{file| {{{image| {{{other|}}} }}} }}} |
|||
| mediawiki = {{{mediawiki| {{{other|}}} }}} |
|||
| template = {{{template| {{{other|}}} }}} |
|||
| help = {{{help| {{{other|}}} }}} |
|||
| category = {{{category| {{{other|}}} }}} |
|||
| portal = {{{portal| {{{other|}}} }}} |
|||
| other |
|||
| #default = {{{other|}}} <!--"demospace=other" or a new namespace--> |
|||
}}<!--End switch--><noinclude> |
|||
<!-- belum --><!-- {{pp-template|small=yes}} --> |
|||
{{documentation}} |
{{documentation}} |
||
<!-- |
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> |
||
</noinclude> |
</noinclude> |