Knowledge (XXG)

Template:FindYDCportal

Source 📝

21: 86: 52: 128:. For use within templates, it is most efficient to invoke the module directly. For one-off use, the template requires less typing and makes the code easier to read. 400: 36: 121:
A helper template to find the most specific chronology portal which actually exists for a given year or decade. Used to simplify linking to a chronology portal.
433: 396: 32: 40: 459: 382: 454: 449: 69: 112: 104: 100: 429: 390: 28: 136:
Takes one parameter, which must be either a year (e.g. "1879", "1123") or a decade (e.g. "1940s", "730s").
108: 139:
If the parameter is missing, empty, or does not fit the required format, an empty string is returned.
125: 65: 374: 111:. The tested changes can be added to this page in a single edit. Consider discussing changes on the 369: 386: 58: 364: 99:
To avoid major disruption and server load, any changes should be tested in the template's
443: 152: 93: 15: 147:
If a portal is found, returns its name without the namespace prefix, e.g.
80: 46: 421: 413: 409: 162:If no portal is found, it returns an empty string. 406:Editors can experiment in this template's sandbox 352:If the century portal exists, return its name. 337:If the century portal exists, return its name. 347:If the decade portal exists, return its name. 332:If the decade portal exists, return its name. 8: 327:If the year portal exists, return its name. 7: 14: 354:Otherwise return an empty string 339:Otherwise return an empty string 124:It is a wrapper template around 94:approximately 180,000 pages 84: 50: 19: 343:If the parameter is a decade: 312:{{FindYDCportal|Swedish chef}} 306:{{FindYDCportal|1927-related}} 1: 323:If the parameter is a year: 476: 460:Portal namespace templates 391:Template:FindYDCportal/doc 380: 197:is a 3- or 4-digit decade 434:Subpages of this template 349:Otherwise try the century 334:Otherwise try the century 329:Otherwise try the decade. 115:before implementing them. 107:subpages, or in your own 92:This template is used on 455:Date-computing templates 182:is a 3- or 4-digit year 375:Knowledge (XXG):Portals 261:{{FindYDCportal|1940s}} 255:{{FindYDCportal|2000s}} 191:{{FindYDCportal|YYY0s}} 428:Add categories to the 267:{{FindYDCportal|560s}} 242:{{FindYDCportal|1800}} 230:{{FindYDCportal|1857}} 224:{{FindYDCportal|1946}} 218:{{FindYDCportal|1982}} 212:{{FindYDCportal|2018}} 176:{{FindYDCportal|YYYY}} 24:Template documentation 236:{{FindYDCportal|736}} 126:Module:FindYDCportal 66:Module:FindYDCportal 57:This template uses 450:Lua-based templates 370:Template:Portalbar 293:{{FindYDCportal|}} 300:Invalid parameter 280:{{FindYDCportal}} 274:Missing parameter 119: 118: 79: 78: 467: 425: 417: 404: 313: 307: 294: 281: 268: 262: 256: 243: 237: 231: 225: 219: 213: 196: 192: 186:Decade parameter 181: 177: 158: 88: 87: 81: 54: 53: 47: 44: 25: 23: 22: 475: 474: 470: 469: 468: 466: 465: 464: 440: 439: 438: 437: 427: 419: 407: 405: 394: 379: 365:Template:Portal 361: 353: 348: 338: 333: 328: 321: 311: 305: 292: 287:Empty parameter 279: 266: 260: 254: 241: 235: 229: 223: 217: 211: 203: 194: 190: 179: 175: 168: 156: 145: 134: 98: 85: 75: 51: 45: 26: 20: 18: 12: 11: 5: 473: 471: 463: 462: 457: 452: 442: 441: 418:and testcases 378: 377: 372: 367: 360: 357: 356: 355: 350: 341: 340: 335: 330: 320: 317: 316: 315: 309: 302: 301: 297: 296: 289: 288: 284: 283: 276: 275: 271: 270: 264: 258: 251: 250: 246: 245: 239: 233: 227: 221: 215: 208: 207: 202: 199: 188: 187: 173: 172: 171:Year parameter 167: 164: 160: 159: 144: 141: 133: 130: 117: 116: 89: 77: 76: 74: 73: 62: 55: 17: 16: 13: 10: 9: 6: 4: 3: 2: 472: 461: 458: 456: 453: 451: 448: 447: 445: 435: 431: 423: 415: 411: 402: 398: 392: 388: 384: 383:documentation 376: 373: 371: 368: 366: 363: 362: 358: 351: 346: 345: 344: 336: 331: 326: 325: 324: 318: 310: 304: 303: 299: 298: 291: 290: 286: 285: 278: 277: 273: 272: 265: 259: 253: 252: 248: 247: 240: 234: 228: 222: 216: 210: 209: 205: 204: 200: 198: 185: 184: 183: 170: 169: 165: 163: 154: 150: 149: 148: 142: 140: 137: 131: 129: 127: 122: 114: 110: 106: 102: 96: 95: 90: 83: 82: 71: 67: 64: 63: 60: 56: 49: 48: 42: 38: 34: 30: 342: 322: 189: 174: 161: 153:Portal:1980s 146: 138: 135: 123: 120: 109:user subpage 91: 387:transcluded 39:] [ 35:] [ 31:] [ 444:Categories 381:The above 193:... where 178:... where 132:Parameters 105:/testcases 432:subpage. 155:" return 113:talk page 359:See also 201:Examples 101:/sandbox 412:| 401:history 399:| 257:→ 2000s 249:Decades 220:→ 1980s 214:→ 2010s 70:sandbox 37:history 426:pages. 422:create 414:mirror 410:create 143:Output 389:from 319:Logic 206:Years 195:YYY0s 166:Usage 157:1980s 151:for " 43:] 41:purge 27:[ 430:/doc 397:edit 180:YYYY 33:edit 29:view 385:is 103:or 59:Lua 446:: 393:. 61:: 436:. 424:) 420:( 416:) 408:( 403:) 395:( 314:→ 308:→ 295:→ 282:→ 269:→ 263:→ 244:→ 238:→ 232:→ 226:→ 97:. 72:) 68:(

Index

view
edit
history
purge
Lua
Module:FindYDCportal
sandbox
approximately 180,000 pages
/sandbox
/testcases
user subpage
talk page
Module:FindYDCportal
Portal:1980s
Template:Portal
Template:Portalbar
Knowledge (XXG):Portals
documentation
transcluded
Template:FindYDCportal/doc
edit
history
create
mirror
create
/doc
Subpages of this template
Categories
Lua-based templates
Date-computing templates

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