Knowledge

Template talk:TOC limit

Source 📝

1116:. Below section 3.2.1, there are a number of alphabetically-titled subsections, headed with CompactTOC template. The whole article has a {{TOC limit|4}} template that should exclude all of these alphabetical sections from the main TOC. This used to work fine... but now they're back, and the depth of the subheadings has gone a bit weird. I can't figure out why - I can only assume that there is now some conflict between Toc limit and CompactTOC. Can anyone help? Thanks, 375: 178:, for instance, will limit to showing ==headings== and ===headings=== but no further (as long as there are no =headings= on the page, which there shouldn't be according to the MoS). */ .toclimit-2 .toclevel-1 ul, .toclimit-3 .toclevel-2 ul, .toclimit-4 .toclevel-3 ul, .toclimit-5 .toclevel-4 ul, .toclimit-6 .toclevel-5 ul, .toclimit-7 .toclevel-6 ul { display: none; } 98: 298: 249: 609:
Hmm. The various mediawiki help page and manuals seem to indicate I should be able to do what I was hoping to. This is frustrating. Unfortunately the actual php source is just confusing me, I have not looked at the magic words handling much and it's not making much sense at the moment. Off to the
448:
Yes, I'm asking about something any user can click on, like the "Hide" toggle in the TOCs now. I think it would be useful for any editor to be able to see the whole TOC when the want too. Personally, I'd be interested in knowing how to override the class tag in my .css in the short term. Can you tell
626:
Yeah, definitely misleading as it's written now. Any chance this can be changed so it'll deal with absolute section depth (the header level) rather than relative (the list depth), or that a new knock-off template can be made? Or add a "depth = {relative OR absolute}" parameter? I'd offer to help but
382:
Would it be possible to add a toggle to the TOC itself that turns the limit off? (Or is there another TOC template that does both?) I use the TOC primarily to see the organization of an article I am editing, especially a longer one, at a glance. A set limit prevents that, but a toggle to show the
836:
Thank you! In case someone as green as I am wonders where in your local WikiMedia installation these rules need to be added, they should be added to your default css. In my case that turned out to be skins/monobook/main.css -- just add it to the end of the file.
1019:
Seems to me like an abuse of this template, really. Why do the subsections exist if they aren't going to be shown in the TOC? Anyway, the problem is due to CSS float rules: since the TOC's float appears in the HTML output after the float for
487:
I spot checked a few random transclusions of this template, and IMO in the majority of cases the article would be better without this template. But I'm not about to embark on any quixotic attempt to mass-remove the template, I just created
1188:
to force specific, or all, TOC levels to display. When I use the code that is in there in my personal common.css file, the TOC is shown as expanded in Vector 2022. I haven't been able to make it work with this template's sandbox though. –
568:
This template counts the depth of the list in the TOC, not the level of the headers. A level-2 followed by a level-6 (with no 3-5 in between) ends up as only two deep in the TOC, otherwise the TOC would end up looking something like this:
1092:
The TOC is not showing on the Talk page of various articles I am coming across. How can this be corrected? I have checked for the "magic word" (_NOTOC_) in them and it doesn't appear to be there and yet no TOC. Suggestions?
644:
I'm having an issue with the limit number, I set it to 1 and get all 5 test levels in TOC, setting it to 2 only shows 1 level, setting it to 3 shows two levels, etc. Does it have to do with <div class="db-dG9jbGltaXQtew":
398:
It shouldn't be that different for anyone who knows a bit of JavaScript (it's just a case of swapping the class on the div), but I'm not that person. If there's no response here, you might want to try pinging
658:
After adding TOClimit to the top of my article's code, it showed up as "Template: TOClimit" in red. So I clicked on it and pasted in what I found in the source code for this, but that didn't work either.
107:
for the content in the destination pages and must not be deleted as long as the copies exist. For attribution and to access older versions of the copied text, please see the history links below.
998:, but its not showing up where it used to not long ago. It seems to be getting pushed down by the infobox, even though it's on the opposite side of the page as the infobox. Any insight? - 929:
If the article has the parameter set to {{TOC limit|4}} and editors use ==Level2==, ===Level3=== and =====Level5===== (omitting level4) the =====Level5===== will still show in the TOC.
883:
It would be great if this piece of info was present on the actual template page documentation for those wanting to copy this functionality for their own installation.
856:. While editing the file mentioned will work (as long as anyone only uses monobook on your site), it may give you trouble when it's time to upgrade your installation. 541:
I created a bunch of level 6 subsections, and with TOClimit either with the default or an explicit level 3 (or 2, or 4 or 5) they all show up in the TOC anyways.
1021: 432:
If you mean a parameter sure that's easy. But if you mean something you can click on .. dunno. Maybe be better to override the class tag in your .css ?
74: 39: 1185: 80: 1113: 884: 870: 672: 1169:
It works at the old Vector but if I change the appearance into Vector(2022), the level 4 headings still shownd. Can we get an update?
535: 104: 328: 146: 946:
Admin assistance is not necessary. I've made an attempt at clarifying the documentation; you can improve it yourself by editing
919:
Presently it states that "{{TOC limit|4}} allows ==== level 4 headers ==== but omits any subheadings below that from the TOC."
1154: 1050: 1008: 615: 600: 558: 20: 69: 1024:, the top of the TOC's float may not appear above the top of the image's float. It's the same thing that used to lead to 123: 544:
I'm doing this as an experiment into a talk / noticeboard page UI improvement but it's just not being cooperative now.
60: 1212: 489: 337: 345: 1235: 611: 596: 554: 437: 913:
Admin assistance is required to change the documentation to accurately depict the role of the limit function.
888: 150: 874: 676: 655:
This feature would make a lot of stuff in our local MediaWiki much clearer, but it does not appear to work.
1174: 1098: 947: 905: 210: 1136: 127: 1208: 520: 408: 238: 1170: 1040:
Cool; thanks! My reasoning is to keep things clean when the subheaders are long in length or number -
177:/* Allow limiting of which header levels are shown in a TOC; <div class="db-dG9jbGltaXQtMw": --> 1231: 1142: 967: 936: 853: 688: 668: 595:
Ack. Darn it. Now I need to look at the actual template source and see what I can do... Thanks.
434: 1178: 1194: 995: 842: 260: 50: 651:
Is this Knowledge-only? How might I set it up in my own, locally installed MediaWiki installation?
1150: 1077: 1048: 1006: 988: 65: 24: 1121: 1094: 509: 472: 46: 103:
Text has been copied to or from this page; see the list below. The source pages now serve to
1032: 954: 860: 827: 587: 516: 496: 454: 422: 404: 388: 355: 234: 1025: 963: 932: 631: 273:
The default value doesn't work currently; the if clause would need to be removed leaving:
916:
It has been noted since late 2009 that this needs changing and still has not been done.
869:
I'm looking where to find the Template as well. Install instructions, anyone? Please?
1190: 838: 331:
to only show ==this size== of headings, but it didn't work. Have i added it wrongly? --
256: 195:
Paste the following code in your page in order to display the TOC with some limitations
350:
I have the same problem, can't anyone explain how to use this, and what to put where?
1146: 1073: 1042: 1000: 400: 306: 282:
Currently if no parameter is used the parser doesn't even get to the default value –
1117: 1070: 468: 1204: 1029: 951: 857: 824: 584: 493: 450: 418: 384: 351: 628: 283: 1239: 1216: 1198: 1158: 1125: 1102: 1081: 1055: 1035: 1013: 971: 957: 940: 892: 878: 863: 846: 830: 680: 636: 619: 604: 590: 562: 523: 499: 476: 467:
I would like to see that too. Without it, this template can be confusing. --
458: 426: 411: 392: 359: 311: 290: 264: 241: 984:
I'm having an issue that appears to be related to an infobox. I'm using
505:
IMO it isn't used often enough - I'd far rather it were used instead of
248: 1227:
the lord basavanna made first parliament in world in 12 th century
662:
Advice on making this template work for a clean Mediawiki install?
852:
Actually, you should just add them to your local installation's
1072:, but I'm hitting errors left and right... Please advise. -- 92: 15: 697:/* Allow limiting of which header levels are shown in a TOC; 142: 138: 134: 119: 115: 111: 1184:
I wonder if it would be possible for someone to tweak
707:(as long as there are no =headings= on the page, which 704:
showing ==headings== and ===headings=== but no further
547:
Is it disabled in user space or something like that?
687:You also need to copy the corresponding rules from 321: 327:Probably get this constantly, but I added it into 222:with no parameter limits the TOC to three levels? 898:Admin or higher needed to fix the documentation 962:That seems fine to me, thank you for doing it 1022:File:Gardiner Expressway Downtown Toronto.jpg 534:I am trying the template on a scratch page ( 322:Classic "can't get the template to work" user 8: 1230:Name of parliament was :-Anubhav Mandapam 383:full TOC would be a nice option. Thanks. - 1140: 96: 710:there shouldn't be according to the MoS). 922:This is not true. It will limit it to a 165:Steps to limit the TOC in your mediawiki 231:class="toclimit-{{{1|{{{limit|3}}}}}}" 147:incubator:Template:Wp/nod/TOC_limit/doc 700:<div class="db-dG9jbGltaXQtMw": --> 277:<div class="db-dG9jbGltaXQtew": --> 225:class="toclimit-{{{1|{{{limit|}}}}}}" 190:<div class="db-dG9jbGltaXQtew": --> 1186:Template:TOC limit/sandbox/styles.css 1164: 218:Can we have a default value, so that 7: 1223:Who made first parliament in world? 1114:International recognition of Kosovo 492:so I can see what is being hidden. 170:Add the following code in the file 124:incubator:Template:Wp/nod/TOC_limit 23:for discussing improvements to the 536:User:Georgewilliamherbert/scratch1 186:and paste the following code in it 14: 329:List of recurring TUGS characters 1112:Something weird has happened at 373: 296: 247: 40:Click here to start a new topic. 864:11:18, 21 September 2009 (UTC) 847:03:12, 21 September 2009 (UTC) 831:22:21, 15 September 2009 (UTC) 681:18:51, 15 September 2009 (UTC) 550:Did I miss something obvious? 538:) and it is just not working. 517:Chris Cunningham (not at work) 405:Chris Cunningham (not at work) 235:Chris Cunningham (not at work) 1: 1199:18:04, 27 February 2023 (UTC) 1165:Doesn't apply to Vector(2022) 972:13:11, 20 February 2011 (UTC) 958:07:09, 20 February 2011 (UTC) 941:04:00, 20 February 2011 (UTC) 879:23:22, 17 November 2009 (UTC) 701:, for instance, will limit to 637:06:56, 28 December 2009 (UTC) 620:02:54, 5 September 2009 (UTC) 605:02:15, 5 September 2009 (UTC) 591:11:55, 4 September 2009 (UTC) 563:04:48, 4 September 2009 (UTC) 449:my how to do that? Thanks. - 312:10:04, 10 December 2008 (UTC) 291:04:16, 10 December 2008 (UTC) 172:yoursite/MediaWiki:Common.css 37:Put new text under old text. 1179:20:02, 18 October 2022 (UTC) 1103:13:34, 24 January 2013 (UTC) 1082:12:14, 11 October 2011 (UTC) 515:and such wherever possible. 441:, 15:48 13 April 2009 (UTC). 360:19:55, 24 January 2009 (UTC) 1069:I am trying to use this on 346:18:08, 5 January 2009 (UTC) 265:18:06, 3 October 2008 (UTC) 242:16:13, 3 October 2008 (UTC) 45:New to Knowledge? Welcome! 1255: 1135:Doesn't seem to work over 1108:Conflict with CompactTOC?? 1064:TOC Limit on sister-wikis? 1056:00:01, 11 April 2011 (UTC) 1036:23:40, 10 April 2011 (UTC) 1028:problems with edit links. 1014:20:12, 10 April 2011 (UTC) 490:User:Anomie/untoclimit.css 483:Is this template overused? 459:00:47, 14 April 2009 (UTC) 427:10:29, 11 March 2009 (UTC) 412:10:20, 11 March 2009 (UTC) 393:10:05, 11 March 2009 (UTC) 371: 1240:15:24, 2 April 2023 (UTC) 1159:02:52, 21 June 2018 (UTC) 1126:14:42, 21 July 2013 (UTC) 893:00:07, 4 March 2010 (UTC) 75:Be welcoming to newcomers 1217:15:46, 14 May 2023 (UTC) 694: 577:6.0.0.0.1 Level-6 header 524:09:54, 1 June 2009 (UTC) 500:02:06, 1 June 2009 (UTC) 1088:Why no TOC on Talk page 665:Douglas, VT, 09/15/09 553:Thanks for any help. 477:18:23, 4 May 2012 (UTC) 948:Template:TOC limit/doc 530:What am I doing wrong? 135:Template:TOC_limit/doc 70:avoid personal attacks 854:Mediawiki:Common.css 689:Mediawiki:Common.css 646:__TOC__</div: --> 612:Georgewilliamherbert 597:Georgewilliamherbert 555:Georgewilliamherbert 278:__TOC__</div: --> 191:__TOC__</div: --> 996:Gardiner Expressway 105:provide attribution 112:Template:TOC_limit 81:dispute resolution 42: 1161: 1145:comment added by 671:comment added by 610:mailing list... 342: 184:Template:TOClimit 159: 158: 91: 90: 61:Assume good faith 38: 1246: 1209:Great Brightstar 1045: 1003: 993: 987: 910: 904: 819: 816: 813: 810: 807: 804: 801: 798: 795: 792: 789: 786: 783: 780: 777: 774: 771: 768: 765: 762: 759: 756: 753: 750: 747: 744: 741: 738: 735: 732: 729: 726: 723: 720: 717: 714: 711: 708: 705: 702: 698: 683: 627:I know no php — 574:6 Level-2 header 514: 508: 377: 376: 340: 336: 309: 304: 300: 299: 251: 221: 215: 209: 182:Create the page 100: 99: 93: 16: 1254: 1253: 1249: 1248: 1247: 1245: 1244: 1243: 1225: 1167: 1133: 1110: 1090: 1066: 1053: 1043: 1011: 1001: 991: 985: 982: 908: 902: 900: 821: 820: 817: 814: 811: 808: 805: 802: 799: 796: 793: 790: 787: 784: 781: 778: 775: 772: 769: 766: 763: 760: 757: 754: 751: 748: 745: 742: 739: 736: 733: 730: 727: 724: 721: 718: 715: 712: 709: 706: 703: 699: 696: 666: 653: 532: 512: 506: 485: 380: 379: 374: 370: 338: 324: 307: 297: 295: 279: 232: 226: 219: 213: 207: 205: 200: 199:{{TOClimit|2}} 192: 179: 167: 97: 87: 86: 56: 12: 11: 5: 1252: 1250: 1224: 1221: 1220: 1219: 1201: 1166: 1163: 1132: 1129: 1109: 1106: 1089: 1086: 1085: 1084: 1065: 1062: 1061: 1060: 1059: 1058: 1051: 1009: 981: 978: 977: 976: 975: 974: 899: 896: 867: 866: 834: 833: 695: 693: 692: 652: 649: 642: 641: 640: 639: 624: 623: 622: 582: 581: 580: 579: 578: 575: 531: 528: 527: 526: 484: 481: 480: 479: 464: 463: 462: 461: 443: 442: 417:OK, thanks. - 415: 414: 372: 369: 366: 365: 364: 363: 362: 323: 320: 319: 318: 317: 316: 315: 314: 280: 276: 274: 268: 267: 230: 224: 204: 201: 198: 197: 196: 189: 188: 187: 176: 175: 174: 166: 163: 161: 157: 156: 155: 154: 131: 101: 89: 88: 85: 84: 77: 72: 63: 57: 55: 54: 43: 34: 33: 30: 29: 28: 13: 10: 9: 6: 4: 3: 2: 1251: 1242: 1241: 1237: 1233: 1228: 1222: 1218: 1214: 1210: 1206: 1202: 1200: 1196: 1192: 1187: 1183: 1182: 1181: 1180: 1176: 1172: 1162: 1160: 1156: 1152: 1148: 1144: 1138: 1130: 1128: 1127: 1123: 1119: 1115: 1107: 1105: 1104: 1100: 1096: 1087: 1083: 1079: 1075: 1071: 1068: 1067: 1063: 1057: 1054: 1049: 1047: 1046: 1039: 1038: 1037: 1034: 1031: 1027: 1023: 1018: 1017: 1016: 1015: 1012: 1007: 1005: 1004: 997: 990: 979: 973: 969: 965: 961: 960: 959: 956: 953: 949: 945: 944: 943: 942: 938: 934: 930: 927: 926:of 4 levels. 925: 920: 917: 914: 911: 907: 906:editprotected 897: 895: 894: 890: 886: 885:203.217.18.57 881: 880: 876: 872: 871:134.253.26.12 865: 862: 859: 855: 851: 850: 849: 848: 844: 840: 832: 829: 826: 823: 822: 690: 686: 685: 684: 682: 678: 674: 673:173.9.119.118 670: 663: 660: 656: 650: 648: 638: 635: 634: 630: 625: 621: 617: 613: 608: 607: 606: 602: 598: 594: 593: 592: 589: 586: 583: 576: 573: 572: 571: 570: 567: 566: 565: 564: 560: 556: 551: 548: 545: 542: 539: 537: 529: 525: 522: 518: 511: 504: 503: 502: 501: 498: 495: 491: 482: 478: 474: 470: 466: 465: 460: 456: 452: 447: 446: 445: 444: 440: 439: 436: 431: 430: 429: 428: 424: 420: 413: 410: 406: 402: 397: 396: 395: 394: 390: 386: 367: 361: 357: 353: 349: 348: 347: 344: 343: 341: 333: 330: 326: 325: 313: 310: 303: 294: 293: 292: 289: 288: 287: 281: 275: 272: 271: 270: 269: 266: 262: 258: 254: 250: 246: 245: 244: 243: 240: 236: 229: 223: 216: 212: 211:editprotected 203:Add a default 202: 194: 193: 185: 181: 180: 173: 169: 168: 164: 162: 152: 148: 144: 140: 136: 132: 129: 125: 121: 117: 113: 109: 108: 106: 102: 95: 94: 82: 78: 76: 73: 71: 67: 64: 62: 59: 58: 52: 48: 47:Learn to edit 44: 41: 36: 35: 32: 31: 26: 22: 18: 17: 1232:Deepakchunke 1229: 1226: 1205:phab:T317818 1171:Ojvolleyball 1168: 1141:— Preceding 1134: 1111: 1095:LookingGlass 1091: 1041: 999: 983: 931: 928: 923: 921: 918: 915: 912: 901: 882: 868: 835: 664: 661: 657: 654: 643: 632: 552: 549: 546: 543: 540: 533: 486: 433: 416: 381: 368:Limit Toggle 339:ReplyOnMine! 335: 334: 332: 301: 285: 284: 255:. Cheers. -- 252: 233: 227: 220:{{toclimit}} 217: 206: 183: 171: 160: 19:This is the 1139:. Broken? 667:—Preceding 964:Chaosdruid 933:Chaosdruid 800:toclevel-7 794:toclimit-7 785:toclevel-6 779:toclimit-6 770:toclevel-5 764:toclimit-5 755:toclevel-4 749:toclimit-4 740:toclevel-3 734:toclimit-3 725:toclevel-2 719:toclimit-2 438:Farmbrough 378:Unresolved 1191:Jonesey95 989:TOC limit 980:Odd issue 839:Liontooth 257:MZMcBride 83:if needed 66:Be polite 27:template. 25:TOC limit 21:talk page 1155:contribs 1147:Johnywhy 1143:unsigned 1074:jcarroll 1044:ʄɭoʏɗiaɲ 1026:WP:BUNCH 1002:ʄɭoʏɗiaɲ 669:unsigned 510:TOCright 308:lucasbfr 228:becomes 51:get help 1131:Broken? 1118:Bazonka 806:display 469:Chealer 143:history 133:Copied 120:history 110:Copied 1030:Anomie 952:Anomie 858:Anomie 825:Anomie 585:Anomie 494:Anomie 451:BillCJ 419:BillCJ 401:WP:VPT 385:BillCJ 352:Elev77 924:depth 286:Ikara 139:oldid 116:oldid 79:Seek 1236:talk 1213:talk 1203:See 1195:talk 1175:talk 1151:talk 1137:here 1122:talk 1099:talk 1078:talk 968:talk 937:talk 889:talk 875:talk 843:talk 812:none 677:talk 629:eitc 616:talk 601:talk 559:talk 521:talk 473:talk 455:talk 435:Rich 423:talk 409:talk 389:talk 356:talk 302:Done 261:talk 253:Done 239:talk 151:diff 145:) → 128:diff 122:) → 68:and 1207:-- 994:on 645:--> 305:-- 1238:) 1215:) 1197:) 1177:) 1157:) 1153:• 1124:) 1101:) 1080:) 992:}} 986:{{ 970:) 950:. 939:) 909:}} 903:{{ 891:) 877:) 845:) 713:*/ 679:) 647:? 618:) 603:) 561:) 519:- 513:}} 507:{{ 475:) 457:) 425:) 407:- 403:. 391:) 358:) 263:) 237:- 214:}} 208:{{ 141:, 118:, 49:; 1234:( 1211:( 1193:( 1173:( 1149:( 1120:( 1097:( 1076:( 1052:¢ 1033:⚔ 1010:¢ 966:( 955:⚔ 935:( 887:( 873:( 861:⚔ 841:( 828:⚔ 818:} 815:; 809:: 803:{ 797:. 791:. 788:, 782:. 776:. 773:, 767:. 761:. 758:, 752:. 746:. 743:, 737:. 731:. 728:, 722:. 716:. 691:: 675:( 633:h 614:( 599:( 588:⚔ 557:( 497:⚔ 471:( 453:( 421:( 387:( 354:( 259:( 153:) 149:( 137:( 130:) 126:( 114:( 53:.

Index

talk page
TOC limit
Click here to start a new topic.
Learn to edit
get help
Assume good faith
Be polite
avoid personal attacks
Be welcoming to newcomers
dispute resolution
provide attribution
Template:TOC_limit
oldid
history
incubator:Template:Wp/nod/TOC_limit
diff
Template:TOC_limit/doc
oldid
history
incubator:Template:Wp/nod/TOC_limit/doc
diff
editprotected
Chris Cunningham (not at work)
talk
16:13, 3 October 2008 (UTC)

MZMcBride
talk
18:06, 3 October 2008 (UTC)
Ikara

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