[Mediawiki-l] Template with parameters

Bobby S bobbys at gmail.com
Fri Aug 29 05:45:52 UTC 2008


I think I read that this is possible somewhere, but I can't find it.
Anyway, I have a parameterized template.  The end result of this
template would be a sortable wikitable where each parameter value
would create a row.  If that value didn't exist I would use the #if
parser function to hide that row from the results.  My question is
this:

What if I don't end up with any values for the parameters thus
producing zero table rows?  Is there a way to hide the top/bottom of
the table and put something in its place such as "No values were given
for this article" as text?  I just don't want to end up with something
like this if there are no table rows due to someone not entered any
values:

{|class="wikitable sortable"
!Name!!Surname!!Height
|}

It would obviously be more user friendly in that instance to just
print "No values were given for this article" as stated before.  I
appreciate any help you can give me on this.



More information about the MediaWiki-l mailing list