வார்ப்புரு:Search link/doc
{{Documentation subpage}}
 &lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&gt;
 
 This is the {{tl|search link}} template.
 
 It creates a link to the Wikipedia search.
 
 === Usage ===
 
 This  template takes one or more parameters. The first unnamed parameter is  the word or phrase to search for. The second unnamed parameter is the  caption for the link.
 
 Here are some examples. Code to the left and actual rendering to the right:
 
 :&lt;code&gt;&lt;nowiki&gt;{{search link|search string}}&lt;/nowiki&gt;&lt;/code&gt; = {{search link|search string}}
 
 :&lt;code&gt;&lt;nowiki&gt;{{search link|search string|link text}}&lt;/nowiki&gt;&lt;/code&gt; = {{search link|search string|link text}}
 
 When doing a basic search like that Wikipedia only searches the [[Wikipedia:Namespace|namespaces]] that the user has set in &quot;My preferences - Search - Namespaces&quot;. If you want to specify what namespaces the search will use, then this template has several ways to do that.
 
 To search all namespaces:
 
 :&lt;code&gt;&lt;nowiki&gt;{{search link|search string|ns=all}}&lt;/nowiki&gt;&lt;/code&gt; = {{search link|search string|ns=all}}
 :&lt;code&gt;&lt;nowiki&gt;{{search link|search string|link text|ns=all}}&lt;/nowiki&gt;&lt;/code&gt; = {{search link|search string|link text|ns=all}}
 
 To specify some namespaces, for instance main (article) space and its talk space (ns0 and ns1):
 
 :&lt;code&gt;&lt;nowiki&gt;{{search link|search string||ns0|ns1}}&lt;/nowiki&gt;&lt;/code&gt; = {{search link|search string| |ns0|ns1}}
 :&lt;code&gt;&lt;nowiki&gt;{{search link|search string|link text|ns0|ns1}}&lt;/nowiki&gt;&lt;/code&gt; = {{search link|search string|link text|ns0|ns1}}
 
 Note  the empty link text parameter in the first example above. That is  because the parameters are unnamed. If &quot;ns0&quot; were fed as the second  parameter then it would become the link text, not the first namespace to  search.
 
 If you want to search several namespaces it can be a bit  tricky to get the namespace numbers right. A convenient way is to go to  [[Special:Search]]  and select the namespaces you want there, fill in a search string, and  then run the search. Then you can simply copy the namespace list from  the URL you get, and feed that list to this template. Say you select the  &quot;Wikipedia:&quot; and &quot;Help:&quot; spaces, then you get the namespace list &quot;&lt;code&gt;ns4=1&amp;ns12=1&lt;/code&gt;&quot;. Then feed it to this template like this:
 
 :&lt;code&gt;&lt;nowiki&gt;{{search link|search string| ns = ns4=1&amp;ns12=1 }}&lt;/nowiki&gt;&lt;/code&gt; = {{search link|search string| ns = ns4=1&amp;ns12=1 }}
 :&lt;code&gt;&lt;nowiki&gt;{{search link|search string|link text| ns = ns4=1&amp;ns12=1 }}&lt;/nowiki&gt;&lt;/code&gt; = {{search link|search string|link text| ns = ns4=1&amp;ns12=1 }}
 
 Don't forget to use the &quot;&lt;code&gt;ns =&amp;nbsp;&lt;/code&gt;&quot; part.
 
 === Warnings ===
 The template is only for [[Help:Talk|talk pages]], [[Help:User page|user pages]], help pages, [[Help:Portal|portals]], etc., and should not be used in regular articles.  If &lt;code&gt;&lt;nowiki&gt;{{search link}}&lt;/nowiki&gt;&lt;/code&gt; is included in an article, it will issue the following warning:
 {{Warning|&lt;nowiki&gt;{{&lt;/nowiki&gt;'''Search link'''&lt;nowiki&gt;}}&lt;/nowiki&gt; should not be used in [[WP:WIAA|articles]] as links to &quot;search result pages&quot; are among the [[WP:LINKSTOAVOID|links normally to be avoided]].}}
 
 === See also ===
 
 * {{tl|google custom}} -  creates a search link to search with Google on all or part of a Web  site; can search on a Wikipedia namespace or a subpage tree.
 * {{tl|search}} – Creates several search links at the same time, to several different search engines and different encyclopedias.
 * {{tl|search subpages link}} - creates a link to search a subpage tree on Wikipedia (for example, a discussion archive).
 * {{tl|wpsearch}} – Creates two search links, one to Wikipedia search and one to Google search.
 
 &lt;includeonly&gt;
 &lt;!-- CATEGORIES AND INTERWIKIS HERE, THANKS --&gt;
 [[Category:Search templates]]