Thanks for pointing out the __TOC__ magic word. Out of interest - for what reason do we support this? It seems like a bad thing to allow inconsistencies between page content on the same wiki. If a table of contents is in the lead section for one article but in the third section for another article this is bad from a user experience point of view.
One of my main pain points I have been experiencing in skin development is the 'bodytext' data value - it makes far too many assumptions about how the content should be rendered.
On Tue, Apr 23, 2013 at 11:21 AM, Derric Atzrott datzrott@alizeepathology.com wrote:
I was experimenting with using the onOutputPageParserOutput hook [1] (running based on the current skin) and think it might be a better approach to run the transformations on smaller chunks of data. For instance the table of contents is known to be in the lead section so it seems like it would be more efficient to look for it there rather than throughout the entire document. The solution is not complete but provides an approach that I think would be more efficient on the long term.
Not to nitpick, but in your particular example one can use the __TOC__ magic word you can place the table of contents wherever you want in the document.[0]
At least in that case, parsing the entire document might be best.
/me goes back to lurking.
Thank you, Derric Atzrott
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l