[Mediawiki-l] Using templates within extension content

Jim R. Wilson wilson.jim.r at gmail.com
Mon Apr 28 20:35:26 UTC 2008


Using templates within extension tags is next-to-impossible due to the
order of operations during a page parse.  If you want to be able to
use template parameters, you should implement a Parser Function [1].
Good luck!

[1] http://www.mediawiki.org/wiki/Manual:Parser_functions

-- Jim R. Wilson (jimbojw)

On Mon, Apr 28, 2008 at 12:09 PM, Paul Wehr
<sf_mediawiki at informationsoftworks.com> wrote:
> 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.
>
>  _______________________________________________
>  MediaWiki-l mailing list
>  MediaWiki-l at lists.wikimedia.org
>  https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>



More information about the MediaWiki-l mailing list