<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bharatpedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Template%3ALinks_to</id>
	<title>Template:Links to - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://en.bharatpedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Template%3ALinks_to"/>
	<link rel="alternate" type="text/html" href="https://en.bharatpedia.org/w/index.php?title=Template:Links_to&amp;action=history"/>
	<updated>2026-09-07T08:46:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://en.bharatpedia.org/w/index.php?title=Template:Links_to&amp;diff=35964&amp;oldid=prev</id>
		<title>WikiDwarf: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://en.bharatpedia.org/w/index.php?title=Template:Links_to&amp;diff=35964&amp;oldid=prev"/>
		<updated>2021-04-25T09:18:25Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:48, 25 April 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>WikiDwarf</name></author>
	</entry>
	<entry>
		<id>https://en.bharatpedia.org/w/index.php?title=Template:Links_to&amp;diff=35963&amp;oldid=prev</id>
		<title>&gt;Jdaloner: &quot;{{plainlink&quot; --&gt; &quot;{{plain link&quot;</title>
		<link rel="alternate" type="text/html" href="https://en.bharatpedia.org/w/index.php?title=Template:Links_to&amp;diff=35963&amp;oldid=prev"/>
		<updated>2018-04-18T19:09:50Z</updated>

		<summary type="html">&lt;p&gt;&amp;quot;{{plainlink&amp;quot; --&amp;gt; &amp;quot;{{plain link&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;onlyinclude&amp;gt;&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
By relying foundationally on search parameter &amp;quot;linksto&amp;quot;,&lt;br /&gt;
this version avoids namespace name variations in the wikitext,&lt;br /&gt;
and reduces the number of search links to two.&lt;br /&gt;
&lt;br /&gt;
This version does not concern itself with URL-style links to sections.&lt;br /&gt;
A later version will re-introduce that functionality, but only&lt;br /&gt;
by way of a parameter that flags the need to produce up to twelve search links.&lt;br /&gt;
&lt;br /&gt;
That version will rely on up to twelve insource searches to do this 2 X 2 X 3:&lt;br /&gt;
+ two kinds of *url: canonicalurl and fullurl&lt;br /&gt;
+ two kinds of atomic search terms: *url with and without space char&lt;br /&gt;
+ up to three namespace names: WP and WT have two other aliases.&lt;br /&gt;
Logical OR to combine the possibilities is not an option for &lt;br /&gt;
search parameter insource.&lt;br /&gt;
&lt;br /&gt;
Output one of the two possible contexts for the search links.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if: {{{2|}}} &amp;lt;!-- Was a page name also given?  --&amp;gt;&lt;br /&gt;
|&amp;lt;!-- True, so don&amp;#039;t output the pink box stuff.&lt;br /&gt;
Instead output a line starting with &amp;quot;fullpagename#Section: &amp;quot;&lt;br /&gt;
--&amp;gt;{{trim | {{{2|{{FULLPAGENAME}}}}} }}#{{ trim | {{{1}}} }}:{{spaces|2}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;|&amp;lt;!-- else False, so output a pink box (a {|table|}) search link--&amp;gt;&lt;br /&gt;
{{(!}} border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;6&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;background:pink;width:61%&amp;quot;&lt;br /&gt;
{{!}}&amp;lt;!-- this translates to a pipe | character, so&amp;#039;s not to confuse #if&amp;#039;s pipe chars --&amp;gt; &lt;br /&gt;
Search links to find links to &amp;#039;&amp;#039;{{{1|section}}}&amp;#039;&amp;#039;:&amp;lt;br/&amp;gt;&lt;br /&gt;
}}&amp;lt;!-- end #if&lt;br /&gt;
&lt;br /&gt;
Output the search links (either context):  #Links and §Links. &lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{plain link&amp;lt;!--&lt;br /&gt;
  --&amp;gt;|{{fullurl:Special:Search|search={{urlencode:&amp;lt;!--&lt;br /&gt;
    --&amp;gt;{{ trim | {{{3|all}}} }}: &amp;lt;!--&lt;br /&gt;
    --&amp;gt;linksto: &amp;quot;{{ trim | {{{2|{{FULLPAGENAME}}}}} }}&amp;quot; &amp;lt;!-- target the entire page&lt;br /&gt;
    (trims any spaces on outer boundary of insource arg)&lt;br /&gt;
    Proof: both linksto and matches &amp;quot;#section&amp;quot;.   &lt;br /&gt;
    Matching &amp;quot;#section&amp;quot; requires a regexp that permits metachars in the section name, and equates _ to space char.&lt;br /&gt;
    --&amp;gt;insource: &amp;quot;{{{2|{{FULLPAGENAME}}}}} {{{1}}}&amp;quot; &amp;lt;!-- target the desired term sequence &lt;br /&gt;
    --&amp;gt;insource:/&amp;quot;&amp;lt;!-- target the redirect symbol and section name&lt;br /&gt;
    Preprocess {{{1}}}, changing &amp;quot; to \&amp;quot;, / to \/ and a space character to [ _]&lt;br /&gt;
    --&amp;gt;{{#invoke:String|replace&lt;br /&gt;
      |source = &lt;br /&gt;
        {{#invoke:String|replace&lt;br /&gt;
          |source = &lt;br /&gt;
            {{#invoke:String|replace&lt;br /&gt;
              |source = {{trim | {{{2|{{FULLPAGENAME}}}}}#{{{1}}} }}&lt;br /&gt;
              |pattern = &amp;quot;&lt;br /&gt;
              |replace = &amp;quot;\&amp;quot;&amp;quot;&lt;br /&gt;
            }}&lt;br /&gt;
          |pattern = /&lt;br /&gt;
          |replace = &amp;quot;\/&amp;quot;&lt;br /&gt;
        }}&lt;br /&gt;
      |pattern = %s&lt;br /&gt;
      |replace = &amp;quot;[ _]&amp;quot; &lt;br /&gt;
      |plain = false&lt;br /&gt;
    }}&amp;quot;/}}}} &amp;lt;!-- end of urlencode and fullurl &lt;br /&gt;
  --&amp;gt;|name=#Links&amp;lt;!-- Make the label fullpagename#Section : WL . TL . EL&lt;br /&gt;
--&amp;gt;}}&amp;lt;!-- end of plain links: #Links&lt;br /&gt;
&lt;br /&gt;
Now for:          §Links&lt;br /&gt;
--&amp;gt;{{middot}}{{plain link&amp;lt;!--&lt;br /&gt;
  --&amp;gt;|{{fullurl:Special:Search|search={{urlencode:&amp;lt;!--&lt;br /&gt;
    --&amp;gt;{{ trim | {{{3|all}}} }}: &amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
    --&amp;gt;linksto: &amp;quot;{{ trim | {{{2|{{FULLPAGENAME}}}}} }}&amp;quot; &amp;lt;!-- &lt;br /&gt;
    Proof: both linksto fullpagename, and matches the given section _inside a template Section link (alias &amp;quot;slink&amp;quot;) call_ .&lt;br /&gt;
    The [Ss](ection )?link finds &amp;quot;section link&amp;quot; or its alias &amp;quot;slink&amp;quot;, and in a case insensitive fashion.&lt;br /&gt;
    The [^}]* construct searches inside the template call.&lt;br /&gt;
    This catches both {{section link || section name }} and {{section link| fullpagename | section name}}.&lt;br /&gt;
    Alternatively, using ({{{2}}} *\| *)? could be used to ensure fewer false positives if {{slink}} ever gets high use.&lt;br /&gt;
    Acceptably, it misses when other kinds of braces are inside: {{section link | {{markup}} | section name}}.&lt;br /&gt;
    --&amp;gt;insource:/\{\{ *[Ss](ection )?link *[^}]*&amp;quot;&amp;lt;!-- QUOTE the regexp &amp;quot; or / chars&lt;br /&gt;
    quotation mark starts escaping any metacharacters in section name&lt;br /&gt;
      --&amp;gt;{{#invoke:String|replace&lt;br /&gt;
        |source = &lt;br /&gt;
          {{#invoke:String|replace&lt;br /&gt;
            |source = &lt;br /&gt;
              {{#invoke:String|replace&lt;br /&gt;
                &amp;lt;!--|source = {{trim | ({{{2|{{FULLPAGENAME}}}}} *\{{!}} *)?{{{1}}} }}&amp;lt;!-- overkill? --&amp;gt;&lt;br /&gt;
                |source = {{trim | {{{1}}} }}&lt;br /&gt;
                |pattern = &amp;quot;&lt;br /&gt;
                |replace = &amp;quot;\&amp;quot;&amp;quot;&lt;br /&gt;
              }}&lt;br /&gt;
            |pattern = /&lt;br /&gt;
            |replace = &amp;quot;\/&amp;quot;&lt;br /&gt;
          }}&lt;br /&gt;
        |pattern = %s&lt;br /&gt;
        |replace = &amp;quot;[ _]&amp;quot; &lt;br /&gt;
        |plain = false&lt;br /&gt;
      }}&amp;quot;/ &amp;lt;!--&lt;br /&gt;
    --&amp;gt;}}}}&amp;lt;!-- end fullurl and url&lt;br /&gt;
  --&amp;gt;|name=&amp;amp;sect;Links&amp;lt;!--&lt;br /&gt;
--&amp;gt;}}&amp;lt;!-- end plain links&lt;br /&gt;
&lt;br /&gt;
Output a newline&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
{{#if: {{{2|}}} |&amp;lt;!-- True, so everything is done.  Do nothing. &lt;br /&gt;
--&amp;gt;|&amp;lt;!-- False, so  defaulting to pink table, output closing table markup--&amp;gt;&lt;br /&gt;
{{!)}}&amp;lt;!--  mark end of the table while inside a template parser function--&amp;gt;&lt;br /&gt;
}}&amp;lt;!-- End of #if --&amp;gt;&amp;lt;/onlyinclude&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Documentation}}&lt;/div&gt;</summary>
		<author><name>&gt;Jdaloner</name></author>
	</entry>
</feed>