[Mediawiki-l] template parameters within preformatted blocks

Frederik Dohr fdg001 at gmx.net
Mon Jan 28 11:40:08 UTC 2008

Hello all,

Is there a way to embed a template parameter within a PRE block?

For example, I need a "File" template that is to be used like this:
     {{File|file name|file contents}}
The template source might look like this:
     '''{{{1|sample file}}}'''
     <pre>{{{2|sample contents}}}</pre>

Unfortunately, the second parameter is never resolved, i.e. it shows up 
as literal "{{{2|sample contents}}}".
I understand that's because PRE sections are not wikified.

However, the file contents need to be contained within a PRE (or NOWIKI) 
block to prevent them from being wikified (e.g. "# comment" would be 
transformed into a numbered list otherwise).

Do I have to rely on users wrapping the file contents into PRE tags?

-- F.

More information about the MediaWiki-l mailing list