-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Rich Evans wrote:
- Is it possible to effectively transclude only the TOC of another
page?
No built-in way to do this.
I suspected that, but I am pretty much counting on someone knowing of an extention or a hook or at least a SQL strategy for me to write my own extention. I can do the programming, I'm just not up to speed with the way section headers are saved in the wikidb.....will someone help me construct a valid SQL statement that I could parse for the TOC data myself?
I don't fully understand the wikidb schema, so I'll start with something foolishly abstract...
SELECT [columns with header info] FROM [page, text, etc..] WHERE [mysterious-page-title-text-joining-condition] AND [article_ID = MyArticleID] AND [line-of-text-in-an-article LIKE %headerflag%] ORDER BY [headings] ASC
can someone help me turn this into a real statement?
Nope, there's nothing in the database for this.
You'd need to load up the article text, pass it through the parser, and grab the header information and/or toc out of there. Offhand, don't know how cleanly this can be done.
- -- brion vibber (brion @ wikimedia.org)