I later found that piece of code. :-) I just have two questions....
I set $wgParser->setOutputType('html'). Is this necessary ?
Regarding the parsing, you said "assuming no use of the parser cache".
I'm doing this for every article shown, so I nead it to use the
parser cache. It would be a bad ideia parsing over and over again the
same article.
In this way, is the cache used internally ou is this a fresh parsing
every time it's run ? How do I make it use the parser cache ?
Thanks for the feedback.
On Jul 6, 2007, at 5:31 PM, Rob Church wrote:
On 06/07/07, Carlos Jorge Andrade
<carlos.andrade(a)gmail.com> wrote:
Having a $wgArticle object how can I get the
*rendered* article
text ? Can't find any method/function that will return that...
getContent just returns the article as wiki markup.
Assuming no use of the parser cache...
global $wgParser, $wgUser;
$output = $wgParser->parse( $wgArticle->getContent(),
$wgArticle->getTitle(), ParserOptions::newFromUser() );
$html = $output->getText();
Rob Church
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l