Wikipedia talk:Substitution/Archive 1

message: The discussions on this article has been copied from a different article. -- Zondor 19:33, 15 November 2005 (UTC)

message: ==== Subst? ====
Is there any reason why this footer advocates the use of  instead of ?  I thought we were moving towards templates, and I would have changed it myself, but I figured there might be an database implementation consideration why this was better for a highly used template like vfd.  Can anyone say which is better? I'd rather have the template, because our vfd anchor format changes so frequently.  - DropDeadGorgias (talk) 20:34, Jun 21, 2004 (UTC)
:See Wikipedia talk:Boilerplate text#Shorthand for old discussion of this. -- Cyrius|✎ 20:54, 21 Jun 2004 (UTC)
replies: text: Why would you have more than 5 VFD notices on the same page? Using subst: violates Wikipedia:Avoid self-references.  And if one wants to stop people from changing it simply protecting the page is available.  anthony (see warning) 10:59, 4 Sep 2004 (UTC)
thread_title:  Subst must be used for calling VfD warning 

message: Is there any reason why this footer advocates the use of  instead of ?  I thought we were moving towards templates, and I would have changed it myself, but I figured there might be an database implementation consideration why this was better for a highly used template like vfd.  Can anyone say which is better? I'd rather have the template, because our vfd anchor format changes so frequently.  - DropDeadGorgias (talk) 20:34, Jun 21, 2004 (UTC)
:See Wikipedia talk:Boilerplate text#Shorthand for old discussion of this. -- Cyrius|✎ 20:54, 21 Jun 2004 (UTC)
thread_title:  Subst? 

message: (Added bcz (not knowing already mentioned) i promised to when i changed it back to subst, and bcz it may help prevent the next well-intentioned breaking of the system.)
Because only 5 expansions of the same template get done per page. (I think true even if they're in subst format, but with subst the restriction only comes into play if you nominate 6 or more pages in the same edit -- since a subst expansion permanently becomes text (and ceases to be a subst) when it's saved.)
It's not a bug, it's an important security feature, so don't bother asking to change it.  The link above probably goes into the details, for those interested.
--Jerzy(t) 01:11, 2004 Aug 21 (UTC)
:Why would you have more than 5 VFD notices on the same page? Using subst: violates Wikipedia:Avoid self-references.  And if one wants to stop people from changing it simply protecting the page is available.  anthony (see warning) 10:59, 4 Sep 2004 (UTC)
thread_title:  Why 

message: Is there any way to make a template call on an article page, and have one of the templates used within a template be substituted to the article page but not the entire template? What I was thinking was having a defined template that had predefined article sections within the template, that would then have those section headings "subst" and become a standard section heading within the article, but have the template that "brought" those headings into the article still be a template call. Lestatdelc (talk) 07:49, 1 March 2012 (UTC)
thread_title:  Subst a template within a template? 

message: Pointer towards WP:Bot owners' noticeboard#Substitution and REVISIONUSER, concerning substitution of certain templates by bots. Amalthea 17:19, 3 May 2010 (UTC)
thread_title:  Substitution and REVISIONUSER 

message: In cleaning up the intro, I noticed a lack of clarity regarding the target of substitution.  Is it just templates that can be substituted, or can any page be substituted? It's clear the guideline's focus is on templates, but just for precision, it'd be good to make the intro fit. 69.142.154.10 (talk) 08:54, 12 July 2010 (UTC)
replies: text: Well yes, any page can be substituted OR transcluded. But usually there's no point in substituting any page other than a template. -- œ™ 09:45, 12 July 2010 (UTC)
replies: text: Help:Substitution offers: '"Substitution is the replacement of a piece of wikicode with its value on saving the page. In particular: a template call is replaced by the template content (with substitution of any parameters); a variable is replaced with its value; a parser function is evaluated." So, for probably 99+% of practical purposes it's all templates. Ocaasi (talk) 12:02, 12 July 2010 (UTC)
thread_title:  Templates or Pages 

message: Just out of interest, what would happen if you subsituted a ? Rcsprinter (talk) 08:18, 3 June 2011 (UTC)
replies: text: I guess you'd just get some expanded text appearing in the wikitext, that has the same effect as a . (But if you want to know for sure, try it and see.)--Kotniski (talk) 14:30, 3 June 2011 (UTC)
replies: text: I tried it in my sandbox, and that's just what happened. Rcsprinter (talk) 19:03, 3 June 2011 (UTC)
replies: text:  Reflist is just a wrapper around , which is special-cased by MediaWiki. Parsing of the current footnotes system is always done at runtime. Chris Cunningham (user:thumperward) - talk 21:53, 14 July 2011 (UTC)
thread_title:  Reflist 

message: Could someone look at Wikipedia_talk:Articles_for_creation/Template:OnProd? Something is weird. Every time I look at the code, the parameters for the #time parser function get replaced by the real date, meaning if I view the template code I will not be able to edit and save it without re-writing because the code will be replaced by the current date. Very bothersome, and I'm not that good at understanding what I've messed up (which is why I save the template for this AFC inside the <pre> tags). Thanks. RiverStyx23{submarinetarget} 15:02, 1 January 2013 (UTC)
replies: text: Maybe try  tags around the date and time parameter so it does not substitute in the template itself before transclusion.--Fuhghettaboutit (talk) 15:11, 1 January 2013 (UTC)
replies: text: I think that did it - take a look at it now? RiverStyx23{submarinetarget} 15:39, 1 January 2013 (UTC)
replies: text: Just tested; seems to be working.--Fuhghettaboutit (talk) 15:49, 1 January 2013 (UTC)

text: Thanks for klewing me in. I am now a templater! RiverStyx23{submarinetarget} 15:59, 1 January 2013 (UTC)
replies: text: Anytime.--Fuhghettaboutit (talk) 16:04, 1 January 2013 (UTC)
thread_title:  Help? 

message: The  template should sign with a transcluded signature template after you sign with four tildes. It maybe the possible answer on Wikia. I replaced it where it's not substituted a signature after it was signed. --Allen talk 23:17, 19 July 2014 (UTC)
thread_title: signatures with no substitution

message: Wikipedia:Village pump (technical)/Archive 130#Auto-subst. For future readers, this will probably one day be in Archive 130 or 131. Oiyarbepsy (talk) 22:22, 8 September 2014 (UTC)
thread_title: Discussion about changing substitution behavior

message: I keep a string handy for timestamps in the logs in my userspace, 
:(..)
which should (as of today) leave 
:(15.05.13)
when I save the page, to display as
:(15.05.13)
a constant string that will not change.
Instead, it leaves
: (.05.13)
which appears as
:(.05.13)
— not small, and updating when the year changes, which is obviously no good for a timestamp.
Currently my only workaround is to manually change the year in my saved string every New Year's Day. Granted, this is only a small nuisance, but it shouldn't be necessary. How can I subst the current year? To discuss this, please  me. --Thnidu (talk) 18:05, 13 May 2015 (UTC)
replies: text: Why jump through hoops when you can  → 15.05.13 --Redrose64 (talk) 18:53, 13 May 2015 (UTC)

text: It does subst, just not the way you expect. If you want to fix that template, see Help:safesubst. Anomie⚔ 22:07, 13 May 2015 (UTC)
thread_title: {{tl|CURRENTYEARYY}} doesn't subst

message: When you substitute a page onto itself, the previous version of the page will be substituted. GeoffreyT2000 (talk) 06:38, 22 November 2015 (UTC)
replies: text: No, it's the current version at the moment before saving: if I replace the whole of this page with  and save, there is no change - if it saved the previous version, your post here would have disappeared. But why would you want to substitute a page onto itself? --Redrose64 (talk) 15:19, 22 November 2015 (UTC)
thread_title: Substituting the page itself

message: I have a template with a #switch parser function, but I don’t want the #switch parser function to appear in the transcluded code.
Example:This is a  sentence
The #switch parser will still be included when the template is transluded onto a page. Is there a way to just include “This is a sentence,” “This is a great sentence,” or “This is a nice sentence,” without the #switch parser being included?
I tried the  tags, but that didn’t work, unfortunately.―PapíDimmi (talk | contribs) 08:46, 1 September 2016 (UTC)
replies: text: I think that is not possible. But you can save the page edit and subst the switch again.
Example:

by saving you get:
This is a  sentence
type now:
This is a  sentence
by saving you get:
This is a great sentence
--Bigbossfarin (talk) 13:26, 10 January 2017 (UTC)
replies: text:  It's possible, see for example Template:Citation needed which substs an #invoke. #switch would work the same way. Anomie⚔ 15:20, 10 January 2017 (UTC)
thread_title: How do I choose code not to be transcluded onto the page?

message: An issue has been raised at Template talk:Lien web that concerns parameters not defined in a substed template. For example, if a subst-only template handles  and  in its substing code, but it does not mention  at all, it appears that  and its value will be dropped (deleted) when the template is substed. This may not always be desirable. 
Is there a way to subst so that undefined parameters are left in the substed code? It's OK if they are not rendered, or if they render error messages, but it would be nice for them to be preserved instead of deleted. – Jonesey95 (talk) 16:09, 17 October 2020 (UTC)
replies: text: No. --Redrose64 🌹 (talk) 22:40, 17 October 2020 (UTC)
thread_title:  Is there a way to subst while leaving unsupported parameters intact? 

message: "cfd, cfr, cfm, which insert comments which serve as queues for Cydebot, which is used to rename or merge categories."
Cydebot has been blocked as a malfunctioning bot for over a year. Shouldn't this bit be removed? widgethocker (talk) 21:27, 16 January 2021 (UTC)
thread_title:  "Templates that must be substituted" section