Knowledge

Template:Documentation

Source 📝

21: 428: 417: 79: 119: 145: 806:
enabled: Main, File, and MediaWiki. (Categories can have subpages, but documentation is created in the Category talk namespace to prevent creating empty categories. There are also a whole bunch of other technical reasons why the /doc page must be stored under the talk page for those (but only those)
1311: 1322: 622: 1307: 1295: 186:
of a certain template, usually from a /doc subpage. It can also be configured to load the content from other pages or be directly fed by text.
36: 802:
The /doc, /sandbox and /testcases pages should normally be in the subject namespace, except in the namespaces that do not have the MediaWiki
1165:
As a suggestion, here are colors for a navbox intended for documentation pages only. They follow the shading of regular blue navbox colors:
642: 1334: 1291: 32: 1206: 1268: 552: 204: 320:
Note that when loading the documentation from a page other than the local /doc subpage, it becomes tricky to handle the categories.
660: 382:
When using this parameter, the toolbar will not show. Note that the /doc subpage in the link box will still show up if it exists.
410:
The heading in the documentation box changes depending on namespace. See the below list for the default text in each namespace:
656: 1360: 704:
Depending on the namespace, the link box may have less features, or may not show up at all. The following table shows this:
86: 40: 791:
often does not work in system messages, and since the MediaWiki namespace needs to be kept clean for performance reasons.
1355: 1317: 1277: 1262: 690: 427: 416: 190: 97: 1239: 1233:, a notice placed at the top of a /doc subpage explaining its role and including a link to the page it documents. 621:
Depending on where to the documentation is placed, it may be tricky to handle the categories and interwikis. See
536: 200:
This template has two parts: the big "documentation box" with the documentation inside alongside a toolbar (the
1302: 1227: 652: 540: 93: 48: 667: 810:
This template automatically points its links for the /doc, /sandbox and /testcases to the right namespace.
1350: 162: 1271:
explains the use of /sandbox and /testcases subpages and includes more information about template testing.
532: 211: 105: 1330: 1285: 645:
with the basic documentation syntax. Preload text is also used for the /sandbox and /testcases links.
28: 104:. The tested changes can be added to this page in a single edit. Consider discussing changes on the 528: 795:
When placed on talk pages, this template usually is placed near the top of the page and without
803: 729:
Full behavior, with the addition of a "create documentation" link when the page does not exist
602: 466: 101: 776: 203:
links), and the smaller "link box" that shows metadata about the documentation alongside the
683:
to a protected template page, so no need to manually add this template to protected pages.
677: 158: 92:
To avoid major disruption and server load, any changes should be tested in the template's
8: 1256: 780: 557:
This code should be added at the bottom of the template code page, with no space before
55: 64: 1281: 978: 608: 130: 561:(which causes extra whitespace to show on pages where the template is transcluded): 214:, where necessary, while allowing anyone to edit the documentation and categories. 194: 183: 1344: 151: 749:
is specified (which will show "The above documentation is transcluded from
539:, etc. This parameter is useful for testing and is used extensively on the 496: 495:|link box=The above documentation is automatically generated from 275:
To transclude a different page other than the /doc subpage, simply provide
15: 1171:<!-- basestyle= sets groupstyle, abovestyle, belowstyle together --> 638:
If the documentation page does not exist, the toolbar is replaced with a
222:
Normally, the template is used without parameters and is placed inside
767:
is specified, the "Add categories to the /doc subpage" will not show.
686:
When this template is on a /sandbox subpage it automatically adds the
623:
Knowledge:Template documentation § Categories and interwiki links
1169:| titlestyle = background:#ccffe5 | basestyle = background:#ddffee 189:
For detailed instructions on how and when to use this template, see
332:
The documentation can also be fed directly as text, by using the
655:. The preload pages for the /sandbox and /testcases links are 454:
Note that if the heading parameter is empty but defined (like
601:
To automatically insert the above text, you can also use the
527:, the template will behave exactly as if it were on the page 397:
takes precedence and always shows in the documentation box.
519:
You can simulate the output for a given page by using the
770: 553:
Knowledge:Template documentation § Where to place it
779:. But in some cases this template needs to be on the 458:) the heading alongside the toolbar will not show. 443:To customize the heading, simply set the parameter 587:<!-- Add categories to the /doc subpage --> 471:|heading-style=font-size:150%;color:red; 256:<!-- Add categories to the /doc subpage --> 1342: 323: 270: 1265:is a how-to guide to template documentation. 616: 566:<!--Last line of your template code--> 523:parameter. For example, if you use the code 341:<!--Last line of your template code--> 284:<!--Last line of your template code--> 235:<!--Last line of your template code--> 210:Use of this template allows templates to be 531:, including showing the documentation from 484: 473:. Not that you should omit quotation marks 1301:Editors can experiment in this template's 797:<noinclude>...</noinclude> 405: 224:<noinclude>...</noinclude> 18: 1269:Knowledge:Template sandbox and test cases 1102:Main border; header background 661:Template:Documentation/preload-testcases 226:at the bottom of the template page (see 775:This template is usually placed in the 449:|heading=Infobox documentation 227: 184:documented information and instructions 1343: 771:Subject namespaces vs. talk namespaces 673:This template also automatically adds 657:Template:Documentation/preload-sandbox 633: 525:|page=Template:Edit protected 489:To customize the link box, simply set 751:{{{1}}} 546: 368:<!-- template documentation --> 699: 663:. The preload page for the /sandbox 643:creates the page with preloaded text 628: 625:for information about adding these. 139: 113: 73: 13: 1176:For subgroups, in child navboxes: 787:In the MediaWiki namespace, since 447:to anything you like, for example 400: 14: 1372: 1207:Periodic table templates overview 1023:Current documentation background 503:To hide the link box, simply set 217: 1263:Knowledge:Template documentation 1147:So saturation in A is a bit off 966:Knowledge background colors for 426: 415: 191:Knowledge:Template documentation 182:template is used to contain the 143: 117: 87:approximately 130,000 pages 77: 19: 1158:Colors for documentation navbox 960: 537:Template:Edit protected/sandbox 813: 653:Template:Documentation/preload 648:The preload page for the /doc 465:parameter can be fed optional 49:Template:Documentation subpage 1: 668:Template:Documentation/mirror 477:and add the ending semicolon 271:Transcluding a different page 1361:Template namespace templates 7: 1218: 533:Template:Edit protected/doc 10: 1377: 1286:Template:Documentation/doc 1275: 550: 514: 53: 46: 1335:Subpages of this template 1123:2nd header, accent colour 1062: 617:Categories and interwikis 228:§ Placement and tags 108:before implementing them. 100:subpages, or in your own 85:This template is used on 1178: 1167: 817: 563: 493:to something else, like 485:Customizing the link box 463:|heading-style= 338: 281: 232: 47:Not to be confused with 1356:Documentation templates 1199:background:#e6fff2 ... 691:Template sandbox notice 641:link. It automatically 529:Template:Edit protected 406:Customizing the heading 304:Template:Other page/doc 230:for more information): 1329:Add categories to the 1240:Barnstar documentation 421:Template documentation 24:Template documentation 1228:Documentation subpage 1117:150°, 10%, 100% 551:Further information: 541:module testcases page 205:sandbox and testcases 125:This template should 1138:150°, 4%, 100% 1096:150°, 15%, 95% 1075:150°, 15%, 75% 432:Module documentation 414:Template namespace: 385:Also note that when 159:Module:Documentation 150:This template uses 1351:Lua-based templates 1014:150°, 6%, 99% 983: 759:Alongside that, if 634:Automatic functions 505:|link box= 491:|link box= 1081:Header border only 965: 765:|content= 547:Placement and tags 456:|heading= 445:|heading= 436:Other namespaces: 425:Module namespace: 395:|content= 391:|content= 334:|content= 326:|content= 1215: 1214: 1151: 1150: 1044: 1042: 982: 979:Help:Using colors 789:<noinclude> 777:subject namespace 757: 756: 742:Other namespaces 700:Link box features 629:Technical details 559:<noinclude> 172: 171: 138: 137: 112: 111: 1368: 1326: 1315: 1299: 1254: 1248: 1244: 1238: 1232: 1226: 1210: 1198: 1195: 1192: 1188: 1185: 1182: 1172: 1154: 1153: 1046: 1040: 1038: 984: 976: 975: 969: 964: 956: 953: 950: 947: 944: 941: 938: 935: 932: 929: 926: 923: 920: 917: 914: 911: 908: 905: 902: 898: 895: 892: 889: 886: 883: 880: 877: 874: 871: 868: 865: 862: 858: 855: 852: 849: 846: 843: 840: 837: 834: 831: 827: 824: 821: 798: 790: 766: 762: 752: 748: 707: 706: 695: 689: 682: 676: 665: 650: 640: 612: 597: 594: 591: 588: 585: 582: 579: 576: 573: 570: 567: 560: 526: 522: 510: 506: 499: 492: 480: 476: 472: 464: 457: 450: 446: 430: 419: 396: 392: 388: 378: 375: 372: 369: 366: 363: 360: 357: 354: 351: 348: 345: 342: 335: 327: 316: 313: 310: 307: 303: 300: 297: 294: 291: 288: 285: 278: 266: 263: 260: 257: 254: 251: 248: 245: 242: 239: 236: 225: 202: 181: 147: 146: 140: 121: 120: 114: 81: 80: 74: 67: 44: 25: 23: 22: 1376: 1375: 1371: 1370: 1369: 1367: 1366: 1365: 1341: 1340: 1339: 1338: 1328: 1320: 1305: 1300: 1289: 1274: 1252: 1246: 1245:, a variant of 1242: 1236: 1230: 1224: 1221: 1216: 1204: 1201: 1200: 1196: 1193: 1190: 1186: 1183: 1180: 1174: 1173: 1170: 1159: 1144:Main background 1135: 1114: 1093: 1072: 1055:What we'd call 1039:(41.7%; 106/255 1036: 1033: 1011: 973: 967: 963: 958: 957: 954: 951: 948: 945: 942: 939: 936: 933: 930: 927: 924: 921: 918: 915: 912: 909: 906: 903: 900: 896: 893: 890: 887: 884: 881: 878: 875: 872: 869: 866: 863: 860: 856: 853: 850: 847: 844: 841: 838: 835: 832: 829: 825: 822: 819: 816: 804:subpage feature 796: 788: 773: 764: 760: 750: 746: 745:Hidden, unless 702: 693: 687: 680: 674: 664: 649: 639: 636: 631: 619: 606: 599: 598: 595: 592: 589: 586: 583: 580: 577: 574: 571: 568: 565: 558: 555: 549: 524: 521:|page= 520: 517: 508: 504: 494: 490: 487: 478: 474: 470: 462: 455: 448: 444: 408: 403: 401:Advanced syntax 394: 390: 386: 380: 379: 376: 373: 370: 367: 364: 361: 358: 355: 352: 349: 346: 343: 340: 333: 330: 325: 318: 317: 314: 311: 308: 305: 301: 298: 295: 292: 289: 286: 283: 276: 273: 268: 267: 264: 261: 258: 255: 252: 249: 246: 243: 240: 237: 234: 223: 220: 201: 175: 168: 144: 118: 91: 78: 72: 71: 63: 58: 52: 45: 26: 20: 12: 11: 5: 1374: 1364: 1363: 1358: 1353: 1273: 1272: 1266: 1260: 1234: 1220: 1217: 1213: 1212: 1179: 1168: 1161: 1160: 1157: 1152: 1149: 1148: 1145: 1142: 1139: 1136: 1133: 1131: 1127: 1126: 1124: 1121: 1118: 1115: 1112: 1110: 1106: 1105: 1103: 1100: 1097: 1094: 1091: 1089: 1085: 1084: 1082: 1079: 1076: 1073: 1070: 1068: 1064: 1063: 1060: 1059: 1053: 1050: 1047: 1037:Hue=150° 1034: 1031: 1029: 1025: 1024: 1021: 1018: 1015: 1012: 1009: 1007: 1003: 1002: 999: 996: 993: 990: 987: 962: 959: 922:heading-style 873:heading-style 818: 815: 812: 793: 792: 781:Talk namespace 772: 769: 755: 754: 743: 739: 738: 737:Full behavior 735: 731: 730: 727: 723: 722: 721:Full behavior 719: 715: 714: 711: 701: 698: 635: 632: 630: 627: 618: 615: 609:subst:doc-code 605:code shortcut 564: 548: 545: 516: 513: 486: 483: 441: 440: 434: 423: 407: 404: 402: 399: 393:is specified, 339: 329: 322: 282: 272: 269: 233: 219: 218:General syntax 216: 170: 169: 167: 166: 155: 148: 136: 135: 122: 110: 109: 82: 70: 69: 59: 54: 17: 16: 9: 6: 4: 3: 2: 1373: 1362: 1359: 1357: 1354: 1352: 1349: 1348: 1346: 1336: 1332: 1324: 1319: 1313: 1309: 1304: 1297: 1293: 1287: 1283: 1279: 1278:documentation 1270: 1267: 1264: 1261: 1258: 1255:for use with 1251: 1250:Documentation 1241: 1235: 1229: 1223: 1222: 1211: 1208: 1177: 1166: 1163: 1162: 1156: 1155: 1146: 1143: 1140: 1137: 1132: 1129: 1128: 1125: 1122: 1119: 1116: 1111: 1108: 1107: 1104: 1101: 1098: 1095: 1090: 1087: 1086: 1083: 1080: 1077: 1074: 1069: 1066: 1065: 1061: 1058: 1054: 1051: 1048: 1035: 1030: 1027: 1026: 1022: 1019: 1016: 1013: 1008: 1005: 1004: 1000: 998:General usage 997: 994: 991: 988: 986: 985: 980: 972: 971:documentation 904:Documentation 864:Documentation 845:Documentation 833:Documentation 823:Documentation 811: 808: 805: 800: 786: 785: 784: 782: 778: 768: 744: 741: 740: 736: 733: 732: 728: 725: 724: 720: 717: 716: 712: 709: 708: 705: 697: 692: 684: 679: 671: 669: 662: 658: 654: 646: 644: 626: 624: 614: 610: 604: 581:documentation 562: 554: 544: 542: 538: 535:, linking to 534: 530: 512: 501: 498: 482: 469:values, like 468: 459: 452: 439: 438:Documentation 435: 433: 429: 424: 422: 418: 413: 412: 411: 398: 383: 356:Documentation 337: 321: 299:Documentation 280: 250:Documentation 231: 229: 215: 213: 208: 206: 198: 196: 192: 187: 185: 179: 178:documentation 164: 160: 157: 156: 153: 149: 142: 141: 133: 132: 128: 123: 116: 115: 107: 103: 99: 95: 89: 88: 83: 76: 75: 66: 61: 60: 57: 50: 42: 38: 34: 30: 1253:}} 1249: 1247:{{ 1243:}} 1237:{{ 1231:}} 1225:{{ 1209:}} 1205:{{ 1202: 1175: 1164: 1056: 974:}} 970: 968:{{ 961:Color scheme 809: 807:namespaces. 801: 794: 774: 761:|1= 758: 747:|1= 703: 694:}} 688:{{ 685: 681:}} 675:{{ 672: 647: 637: 620: 611:}} 607:{{ 603:substitution 600: 556: 518: 502: 497:Template:Foo 488: 460: 453: 442: 437: 431: 420: 409: 387:|1= 384: 381: 331: 319: 277:|1= 274: 221: 209: 199: 188: 180:}} 177: 176:{{ 173: 126: 124: 102:user subpage 84: 68:}} 62:{{ 1282:transcluded 1194:groupstyle 814:Full syntax 678:pp-template 336:parameter: 279:like this: 193:(shortcut: 131:substituted 39:] [ 35:] [ 31:] [ 1345:Categories 1276:The above 1259:templates. 1045:100%, 100% 710:Namespace 696:template. 324:Using the 98:/testcases 1333:subpage. 1318:testcases 1057:the color 1052:Basic hue 940:link box 891:link box 718:Template 713:Behavior 593:noinclude 572:noinclude 374:noinclude 347:noinclude 328:parameter 312:noinclude 290:noinclude 262:noinclude 241:noinclude 212:protected 106:talk page 1257:barnstar 1219:See also 1203:Example: 1006:A  931:heading 913:content 882:heading 851:content 666:link is 651:link is 362:content 94:/sandbox 56:Shortcut 1310:| 1303:sandbox 1296:history 1294:| 1141:  1134:#F5FFFA 1120:  1113:#E6FFF2 1099:  1092:#CEF2E0 1078:  1071:#A3BFB1 1049:  1032:#00FF80 1017:  1010:#ECFCF4 726:Module 515:Testing 371:}}</ 207:links. 195:WP:TDOC 163:sandbox 37:history 1327:pages. 1189:child 1184:Navbox 1020:Sample 799:tags. 1284:from 1001:Note 995:Color 949:page 734:User 590:</ 309:</ 259:</ 43:] 41:purge 27:[ 1331:/doc 1323:edit 1316:and 1312:diff 1308:edit 1292:edit 899:or 659:and 596:> 575:> 569:< 461:The 389:and 377:> 350:> 344:< 315:> 293:> 287:< 265:> 244:> 238:< 174:The 33:edit 29:view 1280:is 1041:dec 992:HSV 989:RGB 859:or 828:or 763:or 753:") 543:. 509:off 507:to 481:. 475:" " 467:CSS 197:). 152:Lua 129:be 127:not 96:or 65:doc 1347:: 1288:. 1181:{{ 1130:4 1109:3 1088:2 1067:1 1028:B 955:}} 901:{{ 897:}} 861:{{ 857:}} 842:{{ 839:}} 830:{{ 826:}} 820:{{ 783:: 670:. 613:. 584:}} 578:{{ 511:. 500:. 451:. 353:{{ 306:}} 296:{{ 253:}} 247:{{ 154:: 1337:. 1325:) 1321:( 1314:) 1306:( 1298:) 1290:( 1197:= 1191:| 1187:| 1043:) 981:) 977:( 952:= 946:| 943:= 937:| 934:= 928:| 925:= 919:| 916:= 910:| 907:| 894:= 888:| 885:= 879:| 876:= 870:| 867:| 854:= 848:| 836:| 479:; 365:= 359:| 302:| 165:) 161:( 134:. 90:. 51:.

Index

view
edit
history
purge
Template:Documentation subpage
Shortcut
doc
approximately 130,000 pages
/sandbox
/testcases
user subpage
talk page
substituted
Lua
Module:Documentation
sandbox
documentation
documented information and instructions
Knowledge:Template documentation
WP:TDOC
sandbox and testcases
protected
§ Placement and tags


CSS
Template:Foo
Template:Edit protected
Template:Edit protected/doc
Template:Edit protected/sandbox

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.