Knowledge (XXG)

Template:URL

Source ๐Ÿ“

21: 52: 105: 203:
The first parameter is parsed to decide whether it is a complete URL. If it doesn't start with a URI scheme (such as "http:", "https:", or "ftp:"), the prefix "http://" is prepended to the specified generated target URL of the
1005: 645:<span class="url">[https://www.example.com/path/ www<wbr/>.example<wbr/>.com<wbr/>/path<wbr/>/]</span> 621:<span class="url">[http://www.example.com/path/ www<wbr/>.example<wbr/>.com<wbr/>/path<wbr/>/]</span> 252:). This applies when the value of the URL is unknown, for example, when this template is used in another template specifying the effective URL as a variable value 521:<span class="url">[irc://irc.example.com/channel irc<wbr/>.example<wbr/>.com<wbr/>/channel]</span> 759:<span class="url">[https://example.com/path?page=42 example<wbr/>.com<wbr/>/path?page=42]</span> 739:<span class="url">[http://example.com/path?page=42 example<wbr/>.com<wbr/>/path?page=42]</span> 708:<span class="url">[http://ExampleExample.com/PathPath exampleexample<wbr/>.com<wbr/>/PathPath]</span> 1128: 1113: 1101: 36: 597:<span class="url">[https://example.com/path example<wbr/>.com<wbr/>/path]</span> 59: 1083: 577:<span class="url">[http://example.com/path example<wbr/>.com<wbr/>/path]</span> 439:<span class="url">[https://www.example.com www<wbr/>.example<wbr/>.com]</span> 419:<span class="url">[http://www.example.com www<wbr/>.example<wbr/>.com]</span> 380:<span class="url">[http://www.example.com www<wbr/>.example<wbr/>.com]</span> 268:<span class="url">[https://example.com/?id=42 example<wbr/>.com?id=42]</span> 1140: 1097: 499:<span class="url">[ftp://ftp.example.com ftp<wbr/>.example<wbr/>.com]</span> 479:<span class="url">[ftp://www.example.com www<wbr/>.example<wbr/>.com]</span> 32: 1161: 859:<span class="url">[https://www.audi.com www<wbr/>.audi<wbr/>.com]</span> 764:
The template currently supports an optional second parameter which is used as the link text, though its use is discouraged (see
182: 688:<span class="url">[http://ExampleExample.com exampleexample<wbr/>.com]</span> 459:<span class="url">[//www.example.com www<wbr/>.example<wbr/>.com]</span> 1156: 273:
The template attempts to handle simple cases where a URL containing an equals sign is specified without the necessary
40: 814:<span class="url">[http://example.com/path?page=42 example.com]</span> 1050: 175: 906: 902: 894: 546:<span class="url">[http://example.com/ example<wbr/>.com]</span> 798:<span class="url">[http://exampleexample.com ExampleExample.com]</span> 670:<span class="url">[http://EXAMPLE.com example<wbr/>.com]</span> 80: 1123: 898: 824: 76: 1039: 846:{{URL | {{Wikidata|property|Q23317|P856}} }} 314:<span class="url">[https://example.com/?id=42 Title]</span> 831: 1108: 782:<span class="url">[http://www.example.com example.com]</span> 72: 1061: 510: 122: 805:{{URL |1= example.com/path?page=42 |2= example.com }} 305:{{URL | 1=https://example.com/?id=42 | 2=Title }} 83:. The tested changes can be added to this page in a single edit. Please discuss changes on the 1087: 1030: 84: 1136: 1091: 94: 28: 654:
is preserved in the URL, but not in the link text (upper case in the path is not changed):
111: 71:
To avoid major disruption and server load, any changes should be tested in the template's
882: 490: 470: 1150: 1021: 1072: 746:{{URL |1= https://example.com/path?page=42 }} 552: 359: 240:
If the URL contains an equals sign, as is common in a query string, the parameter
878: 789:{{URL | exampleexample.com | ExampleExample.com }} 651: 145: 69:
Changes to it can cause immediate changes to the Knowledge (XXG) user interface.
178:. Displaying text instead of the url will render the microformat data invalid. 134:
This template creates a formatted external link. It formats the appearance of
118: 64: 398: 257:{{URL | 1=https://example.com/?id=42 }} 171: 288:
also be explicitly numbered if the first parameter is explicitly numbered (
15: 397:, or a different protocol is preserved in the URL but is not shown in the 820: 773:{{URL | www.example.com | example.com }} 726:{{URL |1= example.com/path?page=42 }} 699: 628:{{URL | https://www.example.com/path/ }} 506:{{URL | irc://irc.example.com/channel }} 324:
The template displays an instructional message if there is no input:
284:
second parameter for the displayed text, if present in legacy uses,
750: 809: 730: 390: 65:
approximately 403,000 pages, or roughly 1% of all pages
632: 584:{{URL | https://example.com/path }} 386: 300:); otherwise it will override the value of the first parameter: 695:{{URL | ExampleExample.com/PathPath }} 608: 426:{{URL | https://www.example.com }} 406:{{URL | http://www.example.com }} 394: 99: 46: 923:
A template to display and format a URL, inside other tempates
486:{{URL | ftp://ftp.example.com }} 466:{{URL | ftp://www.example.com }} 309: 261: 793: 681: 588: 535:{{URL | http://example.com/ }} 568: 430: 1006:
Category:Pages using URL template with unknown parameters
777: 604:{{URL | www.example.com/path/ }} 410: 371: 1117: 983:
The text to be displayed instead of the URL. Deprecated
850: 838: 677:{{URL | ExampleExample.com }} 539: 155: 663: 446:{{URL | //www.example.com }} 229:
above for more information and alternative templates.
160: 154:
If you wish to display text instead of the URL (e.g.
564:{{URL | example.com/path }} 450: 367:{{URL | www.example.com }} 236:
URL with = character should use numbered parameters
881:which takes a URL parameter – see 277:, but it is still better practice to pass it in. 352:<span class="url">...</span> 659:{{URL | EXAMPLE.com }} 148:meta-data, inside templates such as infoboxes. 8: 920: 913:in articles based on its TemplateData. 1107:Editors can experiment in this template's 926: 530:) it is not displayed in the link text: 718: 274: 241: 877:so that it is included in any parent 181:For web-based references, please see 7: 907:See a monthly parameter usage report 713:For a URL containing an equal sign ( 351: 60:MediaWiki:Titleblacklist-custom-URL 329:{{URL| }} 183:Knowledge (XXG):Citation templates 14: 350:The template wraps the output in 170:. Instead, consider using normal 95:Help:Magic words ยง urlencode 355: 103: 50: 19: 555:before any displayed slashes ( 1: 823:as shown in this example for 819:The URL may be obtained from 526:If the path is only a slash ( 244:should be used for the URL ( 1178: 1081: 897:for this template used by 765: 362:before displayed periods: 226: 92: 1141:Subpages of this template 934: 176:Template:Official website 87:before implementing them. 79:subpages, or in your own 58:This template is used in 883:our microformats project 168:do not use this template 140:URLs, while making them 1162:External link templates 869:The template wraps the 551:The template also adds 93:For encoding URLs, see 1135:Add categories to the 1000:Maintenance categories 24:Template documentation 830:, where the property 395:protocol-relative URL 343:optional display text 296:optional display text 216:optional display text 960:The URL to be linked 916:TemplateData for URL 839:https://www.audi.com 110:This template uses 1157:Lua-based templates 997: 931: 929:Template parameters 144:as part of emitted 1031:#invoke:WikidataIB 927: 925: 794:ExampleExample.com 650:Upper case in the 356:ยง Microformat 1033:|url2}} 996: 995: 947: 921: 905:and other tools. 835: 832:official website 828: 132: 131: 91: 90: 1169: 1132: 1121: 1105: 1092:Template:URL/doc 1077: 1071: 1066: 1060: 1055: 1051:Official website 1049: 1044: 1038: 1026: 1020: 979: 956: 948: 932: 876: 857: 854: 852: 847: 833: 826: 812: 806: 796: 790: 780: 774: 757: 754: 752: 747: 737: 734: 732: 727: 720: 716: 706: 703: 701: 696: 686: 683: 678: 668: 665: 660: 643: 640: 638: 636: 634: 629: 619: 616: 614: 612: 610: 605: 595: 592: 590: 585: 575: 572: 570: 565: 558: 544: 541: 536: 529: 519: 516: 514: 512: 507: 497: 494: 492: 487: 477: 474: 472: 467: 457: 454: 452: 447: 437: 434: 432: 427: 417: 414: 412: 407: 378: 375: 373: 368: 353: 346: 330: 312: 306: 299: 276: 266: 263: 258: 251: 243: 220: 200: 165: 162: 142:machine-readable 107: 106: 100: 54: 53: 47: 44: 25: 23: 22: 1177: 1176: 1172: 1171: 1170: 1168: 1167: 1166: 1147: 1146: 1145: 1144: 1134: 1126: 1111: 1106: 1095: 1080: 1075: 1069: 1064: 1058: 1053: 1047: 1042: 1036: 1024: 1018: 1015: 1002: 977: 954: 919: 891: 874: 867: 860: 849: 845: 815: 808: 804: 799: 792: 788: 783: 776: 772: 760: 749: 745: 740: 729: 725: 714: 709: 698: 694: 689: 680: 676: 671: 662: 658: 646: 631: 627: 622: 607: 603: 598: 587: 583: 578: 567: 563: 559:) in the path: 556: 547: 538: 534: 527: 522: 509: 505: 500: 489: 485: 480: 469: 465: 460: 449: 445: 440: 429: 425: 420: 409: 405: 381: 370: 366: 332: 328: 322: 315: 308: 304: 289: 269: 260: 256: 245: 238: 208: 194: 191: 159: 128: 104: 98: 70: 68: 51: 45: 26: 20: 18: 12: 11: 5: 1175: 1173: 1165: 1164: 1159: 1149: 1148: 1079: 1078: 1067: 1056: 1045: 1034: 1027: 1014: 1011: 1010: 1009: 1001: 998: 994: 993: 990: 987: 986: 980: 975: 971: 970: 967: 964: 963: 957: 952: 946: 945: 942: 939: 936: 899:TemplateWizard 892: 890: 887: 866: 863: 862: 861: 858: 817: 816: 813: 801: 800: 797: 785: 784: 781: 762: 761: 758: 742: 741: 738: 711: 710: 707: 700:exampleexample 691: 690: 687: 682:exampleexample 673: 672: 669: 648: 647: 644: 624: 623: 620: 600: 599: 596: 580: 579: 576: 549: 548: 545: 524: 523: 520: 502: 501: 498: 482: 481: 478: 462: 461: 458: 442: 441: 438: 422: 421: 418: 383: 382: 379: 348: 347: 321: 318: 317: 316: 313: 271: 270: 267: 237: 234: 233: 232: 231: 230: 205: 190: 187: 130: 129: 127: 126: 115: 108: 89: 88: 55: 17: 16: 13: 10: 9: 6: 4: 3: 2: 1174: 1163: 1160: 1158: 1155: 1154: 1152: 1142: 1138: 1130: 1125: 1119: 1115: 1110: 1103: 1099: 1093: 1089: 1085: 1084:documentation 1074: 1068: 1063: 1057: 1052: 1046: 1041: 1035: 1032: 1028: 1023: 1017: 1016: 1012: 1007: 1004: 1003: 999: 991: 988: 985: 984: 981: 976: 973: 972: 968: 965: 962: 961: 958: 953: 950: 949: 943: 940: 937: 933: 930: 924: 918: 917: 912: 908: 904: 900: 896: 888: 886: 884: 880: 872: 864: 856: 844: 843: 842: 840: 836: 829: 822: 811: 803: 802: 795: 787: 786: 779: 771: 770: 769: 767: 756: 755:/path?page=42 744: 743: 736: 735:/path?page=42 724: 723: 722: 705: 693: 692: 685: 675: 674: 667: 657: 656: 655: 653: 642: 626: 625: 618: 602: 601: 594: 582: 581: 574: 562: 561: 560: 554: 543: 533: 532: 531: 518: 504: 503: 496: 484: 483: 476: 464: 463: 456: 444: 443: 436: 424: 423: 416: 404: 403: 402: 400: 396: 392: 388: 377: 365: 364: 363: 361: 357: 344: 340: 336: 327: 326: 325: 319: 311: 303: 302: 301: 297: 293: 287: 283: 278: 265: 255: 254: 253: 249: 235: 228: 224: 218: 217: 212: 207:Parameter 2 ( 206: 202: 201: 198: 193: 192: 188: 186: 184: 179: 177: 173: 169: 164: 157: 153: 149: 147: 143: 139: 138: 124: 120: 117: 116: 113: 109: 102: 101: 96: 86: 82: 78: 74: 66: 62: 61: 56: 49: 48: 42: 38: 34: 30: 1076:}} 1070:{{ 1065:}} 1059:{{ 1054:}} 1048:{{ 1043:}} 1040:Official URL 1037:{{ 1029:{{ 1025:}} 1019:{{ 982: 974:Display text 959: 928: 922: 915: 914: 911:Template:URL 910: 903:VisualEditor 895:TemplateData 893:This is the 889:TemplateData 870: 868: 818: 763: 719:|1= 712: 649: 553:<wbr/> 550: 525: 384: 360:<wbr/> 349: 345:}} 342: 338: 334: 333:{{ 323: 295: 291: 285: 281: 279: 275:|1= 272: 247: 242:|1= 239: 222: 215: 214: 210: 196: 180: 167: 151: 150: 141: 136: 135: 133: 81:user subpage 57: 1088:transcluded 938:Description 879:microformat 875:class="url" 873:URL with a 865:Microformat 810:example.com 778:example.com 652:domain name 385:The use of 358:) and adds 339:example.com 248:example.com 197:example.com 172:wiki markup 158:instead of 146:microformat 39:] [ 35:] [ 31:] [ 1151:Categories 1082:The above 1062:Plain link 1008: (24) 992:deprecated 282:deprecated 264:.com?id=42 223:deprecated 166:), please 119:Module:URL 77:/testcases 1139:subpage. 1124:testcases 935:Parameter 871:displayed 837:contains 704:/PathPath 399:link text 137:displayed 85:talk page 63:, and on 1013:See also 969:required 827:(Q23317) 825:Audi AG 821:Wikidata 635:.example 611:.example 517:/channel 513:.example 493:.example 473:.example 453:.example 433:.example 413:.example 391:https:// 374:.example 320:Examples 292:url name 290:{{URL|1= 246:{{URL|1= 211:url name 73:/sandbox 1116:| 1109:sandbox 1102:history 1100:| 751:example 731:example 717:), use 664:example 589:example 569:example 540:example 387:http:// 262:example 161:example 156:website 123:sandbox 37:history 1133:pages. 989:String 966:String 944:Status 834:(P856) 341:| 337:| 225:. See 209:{{URL| 195:{{URL| 1090:from 853:.audi 639:/path 615:/path 593:/path 573:/path 354:(see 310:Title 221:) is 204:link. 189:Usage 152:Note: 43:] 41:purge 27:[ 1137:/doc 1129:edit 1122:and 1118:diff 1114:edit 1098:edit 1022:URL2 941:Type 909:for 855:.com 766:note 753:.com 733:.com 702:.com 684:.com 666:.com 637:.com 613:.com 591:.com 571:.com 542:.com 515:.com 495:.com 475:.com 455:.com 435:.com 415:.com 393:, a 376:.com 286:must 280:The 227:note 163:.com 33:edit 29:view 1086:is 1073:Wbr 951:URL 851:www 768:): 633:www 609:www 511:irc 491:ftp 471:www 451:www 431:www 411:www 372:www 335:URL 294:|2= 174:or 112:Lua 75:or 1153:: 1094:. 901:, 885:. 848:โ†’ 841:: 807:โ†’ 791:โ†’ 775:โ†’ 748:โ†’ 728:โ†’ 721:: 697:โ†’ 679:โ†’ 661:โ†’ 630:โ†’ 606:โ†’ 586:โ†’ 566:โ†’ 537:โ†’ 508:โ†’ 488:โ†’ 468:โ†’ 448:โ†’ 428:โ†’ 408:โ†’ 401:: 389:, 369:โ†’ 331:โ†’ 307:โ†’ 298:}} 259:โ†’ 250:}} 219:}} 199:}} 185:. 114:: 1143:. 1131:) 1127:( 1120:) 1112:( 1104:) 1096:( 978:2 955:1 715:= 641:/ 617:/ 557:/ 528:/ 213:| 125:) 121:( 97:. 67:.

Index

view
edit
history
purge
MediaWiki:Titleblacklist-custom-URL
approximately 403,000 pages, or roughly 1% of all pages
/sandbox
/testcases
user subpage
talk page
Help:Magic words ยง urlencode
Lua
Module:URL
sandbox
microformat
website
example.com
wiki markup
Template:Official website
Knowledge (XXG):Citation templates
note
example.com?id=42
Title
URL
ยง Microformat
<wbr/>
www.example.com
http://
https://
protocol-relative URL

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

โ†‘