[Mediawiki-l] ParserFunctions

Luis Mandel luismandel at gmail.com
Mon May 8 16:04:39 UTC 2006


I believe this is a known problem
I wrote a template called "From" as follows:

__NOEDITSECTION__
{{ #if: {{{1}}} |'''From ''' [[:Category:{{{1}}} | {{{1}}}]]
[[Category:{{{1}}}]] }}
{{ #if: {{{2}}} |,            [[:Category:{{{2}}} | {{{2}}}]]
[[Category:{{{2}}}]] }}
{{ #if: {{{3}}} |,            [[:Category:{{{3}}} | {{{3}}}]]
[[Category:{{{3}}}]] }}
{{ #if: {{{4}}} |,            [[:Category:{{{4}}} | {{{4}}}]]
[[Category:{{{4}}}]] }}
{{ #if: {{{5}}} |,            [[:Category:{{{5}}} | {{{5}}}]]
[[Category:{{{5}}}]] }}

When I call it with 5 parameters it is all OK, b

When calling it with three parameters as follows:

{{From | Ángel Gregorio Villoldo | Angel Labruna | pepe soriano}}

I get

>From Ángel Gregorio Villoldo , Angel Labruna , pepe soriano ,
[[:Category:{{{4}}} | {{{4}}}]] [[Category:{{{4}}}]] , [[:Category:{{{5}}} |
{{{5}}}]] [[Category:{{{5}}}]]

I've tried many work arounds like adding an   as"else" in this way:

{{ #if: {{{2}}} |, [[:Category:{{{2}}} | {{{2}}}]] [[Category:{{{2}}}]] |
 }}

but it didn't work.

I believe that using named parameters might be the solution but I need
unnamed parameters.

If anybody knows how to cope this issue please, let me know.

Best regards,

Luis

luismandel at gmail.com



More information about the MediaWiki-l mailing list