Template talk:TOC limit
Steps to limit the TOC in your mediawiki
/* Allow limiting of which header levels are shown in a TOC; <div class="toclimit-3">, 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; }
<div class="toclimit-{{{1|{{{limit|3}}}}}}">__TOC__</div>
{{TOClimit|2}} Add a default{{editprotected}} Can we have a default value, so that class="toclimit-{{{1|{{{limit|}}}}}}" becomes class="toclimit-{{{1|{{{limit|3}}}}}}" Chris Cunningham (not at work) - talk 16:13, 3 October 2008 (UTC)
Classic "can't get the template to work" user
Limit Toggle Unresolved 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 full TOC would be a nice option. Thanks. - BillCJ (talk) 10:05, 11 March 2009 (UTC)
OK, thanks. - BillCJ (talk) 10:29, 11 March 2009 (UTC)
Is this template overused?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 User:Anomie/untoclimit.css so I can see what is being hidden. Anomie⚔ 02:06, 1 June 2009 (UTC)
What am I doing wrong?I am trying the template on a scratch page ( User:Georgewilliamherbert/scratch1 ) and it is just not working. 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. I'm doing this as an experiment into a talk / noticeboard page UI improvement but it's just not being cooperative now. Is it disabled in user space or something like that? Did I miss something obvious? Thanks for any help. Georgewilliamherbert (talk) 04:48, 4 September 2009 (UTC)
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="toclimit-{{{1|{{{limit|3}}}}}}">__TOC__</div>? Is this Wikipedia-only? How might I set it up in my own, locally installed MediaWiki installation?This feature would make a lot of stuff in our local MediaWiki much clearer, but it does not appear to work. 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. Advice on making this template work for a clean Mediawiki install? Douglas, VT, 09/15/09 —Preceding unsigned comment added by 173.9.119.118 (talk) 18:51, 15 September 2009 (UTC)
/* Allow limiting of which header levels are shown in a TOC;
<div class="toclimit-3">, 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-2,
.toclimit-3 .toclevel-3,
.toclimit-4 .toclevel-4,
.toclimit-5 .toclevel-5,
.toclimit-6 .toclevel-6,
.toclimit-7 .toclevel-7 { display: none; }
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. Liontooth (talk) 03:12, 21 September 2009 (UTC)
I'm looking where to find the Template as well. Install instructions, anyone? Please? 134.253.26.12 (talk) 23:22, 17 November 2009 (UTC) 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. 203.217.18.57 (talk) 00:07, 4 March 2010 (UTC) Admin or higher needed to fix the documentation{{editprotected}} Admin assistance is required to change the documentation to accurately depict the role of the limit function. It has been noted since late 2009 that this needs changing and still has not been done. Presently it states that "{{TOC limit|4}} allows ==== level 4 headers ==== but omits any subheadings below that from the TOC." This is not true. It will limit it to a depth of 4 levels. 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. Chaosdruid (talk) 04:00, 20 February 2011 (UTC)
Odd issueI'm having an issue that appears to be related to an infobox. I'm using {{TOC limit}} on Gardiner Expressway, 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? - ʄɭoʏɗiaɲ τ ¢ 20:12, 10 April 2011 (UTC)
TOC Limit on sister-wikis?
Why no TOC on Talk pageThe 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? LookingGlass (talk) 13:34, 24 January 2013 (UTC) Conflict with CompactTOC??Something weird has happened at International recognition of Kosovo. 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, Bazonka (talk) 14:42, 21 July 2013 (UTC) Broken?Doesn't seem to work over here. Broken? — Preceding unsigned comment added by Johnywhy (talk • contribs) 02:52, 21 June 2018 (UTC) Doesn't apply to Vector(2022)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? Ojvolleyball (talk) 20:02, 18 October 2022 (UTC)
Who made first parliament in world?the lord basavanna made first parliament in world in 12 th century Name of parliament was :-Anubhav Mandapam Deepakchunke (talk) 15:24, 2 April 2023 (UTC) MyselfKill me please 106.194.207.13 (talk) 15:49, 6 November 2024 (UTC) |