This is the
talk page for discussing improvements to the
Parameter names example template. |
|
![]() | To help centralise discussions and keep related topics together, all talk subpages of this template and of Module:Parameter names example redirect here. |
@
Sardanaphalus: I've got the template invocation code working. Try adding |_code=yes
to see the results. At the moment it just uses a standard MediaWiki <pre>...</pre>
tag with line-wrapping enabled. But most documentation pages will want to have different formatting. What formatting options would you like to see? Also, I tried quite hard, but if named parameters are used, it is impossible to preserve the order that they were passed to the template. So in this case, the parameter names are sorted alphabetically. (The alternative is being sorted at random.) —
Mr. Stradivarius
♪ talk ♪
14:49, 29 August 2014 (UTC)
|_code=yes
. Hopefully, per Jackmcbarn
below, it'll be possible to list the parameters as supplied when {{Parameter names example}} is called. Also, hopefully, it'll be possible to include the parameters' values (as at present) for the sake of e.g. an "Examples" section on a /doc page, but suppress them for a "Syntax"/"Parameters" section..? Ideally, I suppose, it would be possible to suppress the appearance of text that would be parsed as values but not e.g. the comments that can appear in these sections:{{Template | parameter_one = | parameter_two = <!--Use {{blah|X|Y|Z}} here--> | parameter_three = | parameter_four = <!--Omit if this or that--> (etc)
_template
..?@ Mr. Stradivarius: I noticed the recent problem with parameter name order. Note that I submitted gerrit:156442 a few days ago. Should it be accepted, it will allow an easy fix for that problem. Jackmcbarn ( talk) 15:42, 29 August 2014 (UTC)
pairs(frame.args)
back when Scribunto was first introduced. But I never wrote any code that relied on that behaviour, so at this stage I'm not really sure whether I was imagining that or not. That's why I tried so hard this time round, anyway. :) —
Mr. Stradivarius
♪ talk ♪
16:12, 29 August 2014 (UTC)Can I use this template to reflect all parameters, without defining each one manually? Capankajsmilyo ( talk) 17:30, 3 April 2018 (UTC)
This is the
talk page for discussing improvements to the
Parameter names example template. |
|
![]() | To help centralise discussions and keep related topics together, all talk subpages of this template and of Module:Parameter names example redirect here. |
@
Sardanaphalus: I've got the template invocation code working. Try adding |_code=yes
to see the results. At the moment it just uses a standard MediaWiki <pre>...</pre>
tag with line-wrapping enabled. But most documentation pages will want to have different formatting. What formatting options would you like to see? Also, I tried quite hard, but if named parameters are used, it is impossible to preserve the order that they were passed to the template. So in this case, the parameter names are sorted alphabetically. (The alternative is being sorted at random.) —
Mr. Stradivarius
♪ talk ♪
14:49, 29 August 2014 (UTC)
|_code=yes
. Hopefully, per Jackmcbarn
below, it'll be possible to list the parameters as supplied when {{Parameter names example}} is called. Also, hopefully, it'll be possible to include the parameters' values (as at present) for the sake of e.g. an "Examples" section on a /doc page, but suppress them for a "Syntax"/"Parameters" section..? Ideally, I suppose, it would be possible to suppress the appearance of text that would be parsed as values but not e.g. the comments that can appear in these sections:{{Template | parameter_one = | parameter_two = <!--Use {{blah|X|Y|Z}} here--> | parameter_three = | parameter_four = <!--Omit if this or that--> (etc)
_template
..?@ Mr. Stradivarius: I noticed the recent problem with parameter name order. Note that I submitted gerrit:156442 a few days ago. Should it be accepted, it will allow an easy fix for that problem. Jackmcbarn ( talk) 15:42, 29 August 2014 (UTC)
pairs(frame.args)
back when Scribunto was first introduced. But I never wrote any code that relied on that behaviour, so at this stage I'm not really sure whether I was imagining that or not. That's why I tried so hard this time round, anyway. :) —
Mr. Stradivarius
♪ talk ♪
16:12, 29 August 2014 (UTC)Can I use this template to reflect all parameters, without defining each one manually? Capankajsmilyo ( talk) 17:30, 3 April 2018 (UTC)