On 19/04/06, Ilmari Karonen nospam@vyznev.net wrote:
For most templates, this would be counterproductive. For those few that would benefit from it, there's <includeonly>.
In fact, you can even do something like this:
<includeonly> (ACTUAL TEMPLATE CODE HERE) </includeonly><noinclude> {{{{PAGENAME}}|PARAMETER1|PARAMETER2}} </noinclude>
to show the parameters as Steve suggests above.
Ah-ha: I didn't realise a template could legally include itself. That's actually quite nice. Logically you would want to then wrap all that code in a nice template called {{showtemplate}} or something, but I'm almost certain that's not possible :)
Also, that actual code didn't work for my test in the user namespace, presumably something to do with {{PAGENAME}} not returning the namespace. But that's ok.
Though I must say, the edit preview you get when using code like that is extremely confusing ;) Since it shows you the previous incarnation of the code...then you save it, and you think you're seeing the current version, but when you press edit, it changes again. Eep. A nice, minor brainf*ck.
Steve