Thread:Project:Support desk/How can optional parameters be forwarded from a proxy template

This is an advanced templating issue which I believe is a limitation in current MediaWiki versions. I'm aware of a number of possible workarounds but none are elegant in the following scenario.

Suppose we have two templates, a proxy template which is called from some other page directly, and another template which is the target of the proxy.

Template:Proxy may be defined as follows:

Template:Target may be defined as follows:

The target template simply outputs a link to page whos caption matches, or if parameter two is undefined, the value of  with the string prefix, "My link: ".

The problem is that the proxy template can never take advantage of the behaviour of omitting the second parameter because somehow passing a blank parameter and not defining it are not the same thing. The proxy will always pass either the value it receives in parameter two, or blank, but never undefined. It does not seem possible to pass optional parameters from one template to another. Am I wrong?

Although details of the target template are exposed for the purposes of this example, please treat the target as a black box and do not propose modifications to the target which accommodate the fact that it is being targeted by a proxy; the target must remain unaware of the proxy.