Hi all,
A temporary way to generate Table of Contents (TOC) is to write __FORCETOC__ or _TOC_ before starting the page but what if we don't want that. Let's say we want to have all and any pages that has more than 2 sections should have a TOC. Is there a way to do it ?
By default in mediawiki installation it needs 4 sections.
From https://en.wikipedia.org/wiki/Help:Section#Table_of_contents_.28TOC.29
addition at bottom :-
On 10/14/2015 08:14 PM, shirish wrote:
Hi all,
A temporary way to generate Table of Contents (TOC) is to write __FORCETOC__ or _TOC_ before starting the page but what if we don't want that. Let's say we want to have all and any pages that has more than 2 sections should have a TOC. Is there a way to do it ?
By default in mediawiki installation it needs 4 sections.
From https://en.wikipedia.org/wiki/Help:Section#Table_of_contents_.28TOC.29
Please CC me as I'm not subscribed to the list as it's a high-traffic list, sorry.
On 2015-10-14 16:44, shirish wrote:
Hi all,
A temporary way to generate Table of Contents (TOC) is to write __FORCETOC__ or _TOC_ before starting the page but what if we don't want that. Let's say we want to have all and any pages that has more than 2 sections should have a TOC. Is there a way to do it ?
Sadly no, it's hardcoded in Parser.php.
# if there are fewer than 4 headlines in the article, do not show TOC # unless it's been explicitly enabled. $enoughToc = $this->mShowToc && ( ( $numMatches >= 4 ) || $this->mForceTocPosition );
There should probably be a bug raised in Phab about this.
On 16 October 2015 at 03:25, Bartosz Dziewoński matma.rex@gmail.com wrote:
On 2015-10-14 16:44, shirish wrote:
Hi all,
A temporary way to generate Table of Contents (TOC) is to write __FORCETOC__ or _TOC_ before starting the page but what if we don't want that. Let's say we want to have all and any pages that has more than 2 sections should have a TOC. Is there a way to do it ?
Sadly no, it's hardcoded in Parser.php.
# if there are fewer than 4 headlines in the article, do not show TOC # unless it's been explicitly enabled. $enoughToc = $this->mShowToc && ( ( $numMatches >= 4 ) || $this->mForceTocPosition );
-- Bartosz Dziewoński
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org