[Mediawiki-l] Prevent template parameter from being parsed

Jean-Marc van Leerdam j.m.van.leerdam at gmail.com
Fri Aug 14 08:32:06 UTC 2009


Hi,

Is there a way to force a template to use the literal value of a
parameter instead of the parsed result?

For example, if I pass [[Main Page]] to a template, I want it to
output that text, not a hyperlink to the Main Page of the wiki.

My workaround now is to add <nowiki></nowiki> in the call to the
template, but that defeats my purpose: I want the template to be able
to display both the literal text as the processed text. This forces me
to pass two parameters, one with and one without the <nowiki></nowiki>
tags:

{{Demo|[[Main Page]]}}

should render:

If you use <tt><nowiki>[[Main Page]]</nowiki></tt>, it will show up as
[[Main Page]].

BTW: The Wiki is at version 1.11.0 at the moment.

-- 
Regards,

Jean-Marc
--
.       ___
.  @@  // \\      "De Chelonian Mobile"
. (_,\/ \_/ \     TortoiseSVN
.   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
.   /_/   \_\     http://tortoisesvn.net



More information about the MediaWiki-l mailing list