[Mediawiki-l] Using templates within extension content

Paul Wehr sf_mediawiki at informationsoftworks.com
Mon Apr 28 17:09:56 UTC 2008


I was excited to leverage the template facility to map a complex process 
using the graphviz (http://www.mediawiki.org/wiki/Extension:GraphViz) 
extension, which would then be included as a template on each page 
created for a node in the process, then use {{SUBPAGENAMEE}} in the 
template to automatically highlight where in the process graph this page 
documents, a sort of "You are here".

But alas, it appears that parameters (e.g. {{SUBPAGENAME}}), Templates, 
and ParserFunctions ({{#ifeq:...}}) are not interpreted within the 
<graphviz> tags.  I get a graphviz nodes named, literally, "Test", 
"ifeq", and "SUBPAGENAMEE", using:

<graphviz>
digraph g {
Test {{ #ifeq: {{SUBPAGENAMEE}} | Test | [color="yellow"] }};
}
</graphviz>

Is there a way to get the template/extentions parser to mangle the 
graphviz content before graphviz sees it?  Is there an easier way to 
achieve the goal above?  I don't mind modifying the extension scripts, 
or mediawiki, but with otherwise no experience in the code base, anyone 
who could even point me in the right direction would be helpful.



More information about the MediaWiki-l mailing list