Template talk:Issubst
Edit request - adding comment in noinclude section
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Add some sort of comment, for example <!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES TO THE /doc SUBPAGE, THANKS -->
, to the <noinclude>
section as per WP:DOC
APerson (talk!) 03:08, 11 November 2013 (UTC)
- Not done: I don't think it's really worth adding 60,000 pages to the job queue just to add an html comment. Maybe you could add a note to the /doc subpage instead? Best — Mr. Stradivarius ♪ talk ♪ 04:58, 11 November 2013 (UTC)
Template-protected edit request on 4 July 2016
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Should it be changed to {{ {{{|safesubst:}}}ifsubst|yes|}}
?
Please note that the parameter {{{2}}}
must be completely blank.
83.31.146.90 (talk) 15:33, 4 July 2016 (UTC)
- Your suggestion to use {{Ifsubst}} is in the Template:Issubst/sandbox, tested at {{X7}} for now. Yes, logically it works, but I believe that the way it's currently written is possibly more performant, rather than relying on a different template. Using {{ifsubst}} will raise the number of transclusions of that template from 2K to about 69K if I'm not mistaken. Honestly not sure if it's a drastic improvement. Re-open if you suggest otherwise. Not done for now. — Andy W. (talk · ctb) 15:59, 4 July 2016 (UTC)
Template-protected edit request on 19 March 2024
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please replace the code with the sandbox version, shown below:
{{safesubst:<noinclude/>#if:{{#if:}}|yes}}<noinclude>
{{Documentation}}
</noinclude>
The current version compares {{NAMESPACE}}
to {{safesubst:NAMESPACE}}
, which is needlessly complex. The above version instead relies on the fact that {{#if:}}
expands to nothing when not substing, and to itself when substing. Note that {{#if:}}
is not particularly special; any of several other parser functions and templates could be used instead.
Another alternative is to use an HTML comment <!---->
instead of the {{#if:}}
call. While that is more efficient, I am not sure it is safe to assume that a substed #if will treat an HTML comment as non-empty. Is that a bug or a feature? There are no tests for this in the ParserFunctions code repository, and the parser replaces comments with strip markers, which many parser functions remove from their input. So I think that unless and until a separate {{#ifsubst:}}
parser function is created, the version I propose is the best one.
P.S. I did consider including #Edit request - adding comment in noinclude section in this request, using text from WP:TDOC#Put documentation in the template, though decided against it because this is a protected template; users who have access to edit it should already be aware of WP:CAT#T. PleaseStand (talk) 19:31, 19 March 2024 (UTC)
- This template is used in 70,000 pages and hasn't changed materially in 14 years. Is there really a need for this change? – Jonesey95 (talk) 20:14, 19 March 2024 (UTC)
- Deactivated my edit request, as the above comment appears to indicate this is a controversial change. The proposed version improves efficiency of the code, though apparently, not everyone considers the improvement to be significant enough for a highly-used template. PleaseStand (talk) 06:30, 22 March 2024 (UTC)