[Mediawiki-l] Ignoring Template Whitespace

Adam Meyer meyer7 at mindspring.com
Tue Aug 24 12:23:35 UTC 2010


I have a template I use for about 1/4 of all the pages on my wiki that is pretty complex. I have many sections that if are left blank, the entire section does not show up.
But when those sections are left blank, the template leave whitespace (line breaks) filling the area that section would have been in.

Id like it if the sections were blank that it truly ignores that area. It probably has to do with the white space in the template, but without it, it's very unreadable (example below if needed)




From my template:
{{ #if:  {{{Hooking it up |}}} |
== Hooking it up  ==
{{{Hooking it up}}}
}}

{{ #if:  {{{Code Information|}}} |
== Code  ==
{{{Code Information}}}
}}

{{ #if:  {{{Availability |}}} |
==Availability==
{{{Availability}}}
}}

so if I have:
| Hooking it up  = this that
| Code Information = hello code
| Availability = Availability of this

Everything is fine. But if I have this (blank code section):
|Hooking it up  = this that
|Code Information = 
|Availability = Availability of this

I end up with the section for code being blank, but it still takes up space on the page as if I had a ton of line breakes.


thanks,
-Adam


More information about the MediaWiki-l mailing list