Why do templates break my table of contents???

Fragment of a discussion from User talk:HamishC
Jump to: navigation, search

Whoah! Thanks for the reply Jim. I wasn't expecting someone to find my talk thread on my page. :):)

On this page here, the case study template comes up on the ToC but not the example template: http://wikieducator.org/Albany_Senior_High_School/Impact_Projects/Proposal

There doesn't seem to be anything in the markup I can see which sets it one way or the other?

HamishC (talk)11:00, 23 October 2014

I had poked around last night and realized you meant the Pedagogical Templates, and noticed the Template:Example in particular. You've encountered a long standing bug in how those templates were built. I made a change to the Example template to prevent it from appearing in the table of contents by default, and it seemed to fix the problem for the pages I checked. I'll have to go through and change the other 25+ Pedagogical Templates. I've just done Template:Case study so the page you cited should look better.

You can still force a Pedagogical Template to appear in the table of contents by using the TOCdepth=n parameter to each template (where n is the desired level in the ToC).

Thanks for the report.

Jim Tittsler (talk)12:01, 23 October 2014

Brilliant! Thanks Jim. I've just noticed the activity template does it too... :) Example below. http://wikieducator.org/Albany_Senior_High_School/Impact_Projects/The_Four_Principles

Love that script too btw,cheers!

HamishC (talk)08:12, 24 October 2014