Last modified: 2010-05-15 15:28:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T2847, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 847 - Feature Request: default values for template-parameters
Feature Request: default values for template-parameters
Status: RESOLVED DUPLICATE of bug 364
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
1.3.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-09 18:58 UTC by Daniel Kinzler
Modified: 2010-05-15 15:28 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Kinzler 2004-11-09 18:58:09 UTC
I would like to have a better way to specify default values for template
paramteres. I would suggest the syntax {{{1|foobar}}} to make "foobar" the
default value for the first anonymous parameter. However, this may not work for
the rather common case that you want to use {{PAGENAME}} as the default:
{{{1|{{PAGENAME}}}}} may confuse the praser... but a similar syntax could
probably be found.

The reason is that the current approach, namely using Template:xyz as the
default-value for {{{xyz}}} is counter intuitive and leads to a great many
"useless" templates. Also, this does not work for anonymous parameters, as there
can be only on Template:1. Also, each template has to be careful not to use
parameter names already used by another template - that's hard to maintain and
leads to long and/or cryptic parameter names.
Comment 1 Daniel Kinzler 2004-11-09 19:00:33 UTC
Note: this Bug is related to but not the same as #364.
Comment 2 Rowan Collins [IMSoP] 2004-11-09 21:15:13 UTC
Firstly, note that the current behaviour *isn't* to use Template:xyz as the
default value for {{{xyz}}}; there is simply a dubious behaviour in the parser
(seemingly fixed in CVS) that makes it see "{{{xyz}}}" as "{" + "{{xyz}}" + "}",
and thus include a template.

Secondly, I'm going to mark this as a duplicate of bug 364 after all, because I
think they are both requesting the same feature, just describing it differently;
for a more complete explanation, see my comments there.

*** This bug has been marked as a duplicate of 364 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links