I have some MediaWiki article that will look like:
===Section===
Text Here, some lists, and some other text
===Section2===
{{#ask Query for a Table}}
===Section3===
{{#ask Query for a JQPlot}}
I would like to get the page data, on a per section basis and then process the query in PHP, making a custom parser. I made a page which extends SpecialPage.
$title = Title::newFromText($page);
$article = new Article($title);
$parserOptions = ParserOptions::newFromUser($wgUser);
$article->getRawText();
Currently, I can getRawText() which will return Some Text Here===Section1===More===Section2==={{#ask:Query}}===Section3==={{#ask:Query}}
.
How do I process each query (get raw data from the database) so I can parse the data and create a custom output for each query? Moreso, how do I process it on a per section basis? From the documentation, it appears I can use extractSections() but this is assuming I know how many sections there are. Did I miss something?