编辑“︁
Template:CatAutoTOC/doc
”︁
跳转到导航
跳转到搜索
这是
CatAutoTOC
模板的
文档页面
。
警告:
您没有登录。如果您进行任何编辑,您的IP地址会公开展示。如果您
登录
或
创建账号
,您的编辑会以您的用户名署名,此外还有其他益处。
反垃圾检查。
不要
加入这个!
{{NoteTA|G1=MediaWiki}}{{Documentation subpage}} {{lua|Module:HTMLDecode}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> 當某一分類包含超過一定數量的頁面時,本模板會自動增加分類目錄: # <= 100個頁面 → 沒有分類目錄 # 101–1200個頁面 → {{tl|CategoryTOC}} # > 1200個頁面 → {{tl|LargeCategoryTOC}} ==用法== <code><nowiki>{{CatAutoTOC}}</nowiki></code> On category pages, <code><nowiki>{{CatAutoTOC}}</nowiki></code> can be placed wherever you want the TOC to be displayed. On a category header template, it is best placed outside any <code><nowiki><includeonly></includeonly></nowiki></code> tags, so that the template is categorised as using CatAutoToc. ===參數=== 本模板沒有必填參數。 However, the parameters available {{tl|CategoryTOC}} may be supplied, and if CatAutoTOC calls {{tl|CategoryTOC}}, those parameters will be passed on to {{tl|CategoryTOC}}. So e.g. <code><nowiki>{{CatAutoTOC|align=center}}</nowiki></code> will: # Have no effect if no TOC is generated # Align to the center if {{tl|CategoryTOC}} is used # Have no effect if {{tl|LargeCategoryTOC}} is used, because {{tl|LargeCategoryTOC}} accepts no parameters ==追蹤== <div style="display:block; float:right">{{CatAutoTOC stats}}</div> 每個有放置本模板的頁面,將會被歸類於以下三個分類之一: * [[:Category:CatAutoTOC generates no TOC]] * [[:Category:CatAutoTOC generates standard Category TOC]] * [[:Category:CatAutoTOC generates Large category TOC]] Templates which transclude {{tl|CatAutoTOC}} are categorised in * [[:Category:Templates using CatAutoTOC]] (population: {{PAGESINCATEGORY|Templates using CatAutoTOC}}) ... but only if the transclusion is outside any <code><nowiki><noinclude></noinclude></nowiki></code> tags <small>{{Purge|''Purge this page to update the totals''}}</small> ==缺陷== This template uses the [[Help:魔术字|magic word]] <code><nowiki>{{PAGESINCATEGORY}}</nowiki></code> to count the number of pages in the category. Unfortunately, this function can return wildly erroneous results on some categories which have had many pages added and removed. This bug is well-known, and has been documented in several places since 2010, including: * [[phab:T18036]] * [[phab:T221795]] * [[phab:T69196]] In the overwhelming majority of categories, the count is recorded accurately enough to support use of this template. However, there seemed to be some issue with <code><nowiki>{{PAGESINCATEGORY}}</nowiki></code> falsely returning zero in some cases. This is tracked in: * [[:Category:CatAutoTOC on pages where PAGESINCATEGORY returns zero]] (population: {{PAGESINCATEGORY:CatAutoTOC on pages where PAGESINCATEGORY returns zero}}) As of 19 April 2020, that problem seems to have been fixed by a small but cunning tweak[https://en.wikipedia.org/w/index.php?title=Template%3ACatAutoTOC&type=revision&diff=951919806&oldid=950933704] to how <code><nowiki>{{PAGESINCATEGORY}}</nowiki></code> is called. The category ''should'' contain only pages labelled as "empty". <small>{{Purge page|''Purge page to update totals''}}</small> ==參見== * [[Template:CategoryTOC]] * [[Template:LargeCategoryTOC]] <includeonly>{{sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:分類頁眉模板]] [[Category:維基百科分類目錄模板]] }}</includeonly>
摘要:
请注意,所有对Local Chinese Wikipedia的贡献均可能会被其他贡献者编辑、修改或删除。如果您不希望您的文字作品被随意编辑,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源(详情请见
Project:著作权
)。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)
导航菜单
个人工具
未登录
讨论
贡献
创建账号
登录
命名空间
模板
讨论
大陆简体
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
臺灣正體
查看
阅读
编辑
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息