All the examples on this page have been commented out to prevent the page from being very slow to load. If you want to see the outcome of a search example, just edit the page and remove the comment tags around the desired example. You don't need to save the page, a preview will give you the search results; that way you can experiment with the examples and easily restore the page to its original state when you are done.
Enter {{Search|text}} anywhere to get the search results in the form of links. Here text can be plain text or a perl like regexp. Be careful to escape regexp meta characters. If the searched text contain wiki markup this template may nor give the desired results; see the next section.
The Search template searches only the main namespace, and only original English pages.
Example: To find all English pages containing the word 'application' - possibly capitalized enter this:
{{Search|[Aa]pplication}}
| Information |
|---|
The results should just be a link to each page containing the searched text. For some reason, however, some pages include the content at the beginning of the page, typically an info box, an image or tabular material. This can be avoided by ensuring that the pages searched start by <languages />. If the page doesn't have translate tags this directive have no effect, but it prevents the unwanted inclusion of content from the page in the search result. |
Enter {{SearchLang|text|lang}} anywhere to get the search results in the form of links. Here text can be plain text or a perl like regexp and lang is a language code. Be careful to escape regexp meta characters. If the searched text contain wiki markup this template may nor give the desired results; see the next section.
Example: To find all Danish pages containing the word 'program' - possibly capitalized enter this:
{{SearchLang|[Pp]rogram|da}}
Use {{LinksTo|full page name}}. The full page name must be the entire wiki link up to (but not including) one of the characters '|', ']' or '#' and excluding Special:myLanguage. Note, that space characters in names are sometimes entered as '_', so in searches you should enter [ _] for spaces.
Example: To find all pages linking to Getting Help enter
{{LinksTo|Getting[ _]Help}}
In case the Search template does not work for you use code like this to accomplish your desired result:
<DPL>
namespace = Main
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$
titleregexp = ^[A-J]
include = *
includematch = @\{\{Remember\|3=@
includemaxlength = 0
format = ,\n* [[%PAGE%|%TITLE%]],,
resultsheader = There are %TOTALPAGES% pages beginning with A-J\n
</DPL>
<DPL>
namespace = Main
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$
titleregexp = ^K[A-Z]
include = *
includematch = @\{\{Remember\|3=@
includemaxlength = 0
format = ,\n* [[%PAGE%|%TITLE%]],,
resultsheader = There are %TOTALPAGES% pages beginning with KA-KZ\n
</DPL>
<DPL>
namespace = Main
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$
titleregexp = ^K[a-z]
include = *
includematch = @\{\{Remember\|3=@
includemaxlength = 0
format = ,\n* [[%PAGE%|%TITLE%]],,
resultsheader = There are %TOTALPAGES% pages beginning with Ka-Kz\n
</DPL>
<DPL>
namespace = Main
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$
titleregexp = ^[L-Z]
include = *
includematch = @\{\{Remember\|3=@
includemaxlength = 0
format = ,\n* [[%PAGE%|%TITLE%]],,
resultsheader = There are %TOTALPAGES% pages beginning with L-Z\n
</DPL>
Normally, you'd want to copy all of this into your page and modify the includematch lines to the pattern you want to search for. Note the two @-characters; they mark the beginning and end of the actual search pattern. You can use any character instead of @ as long as it does not appear in the actual pattern.
| Note |
|---|
Some characters such as ¤ do not work as pattern delimiters; perhaps only ASCII characters can be used? |
| Be aware! |
|---|
| The page count reported by each query is not the number of matching pages found, but the total number of pages searched in that group. That number should always be less than 500! If it is not then some of the pages will not have been searched. |
If you want to search other namespaces than Main, just change that line. The nottitleregexp lines filters out all translated pages including lingering old style translations and should not be touched. The titlematch lines are needed to split up the search into manageable chunks. There is a maximum of pages that can be handled by the includematch search; if too many pages pass through the title filters the first ones up to the maximum number will be searched; the rest will be silently ignored! Currently, the maximum seems to be 1000. The include and includemaxlength should never be modified.
<DPL> namespace = Main nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ titleregexp = ^[A-J] include = * includenotmatch = #<languages[ ]?/># includemaxlength = 0 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages beginning with A-J\n </DPL> ...
<DPL>
namespace = Template
include = *
includematch = /{{Icon/
includemaxlength = 0
format = ,\n* [[%PAGE%|%TITLE%]],,
resultsheader = There are %TOTALPAGES% templates using the Icon template\n
</DPL>
Perhaps more talk namespaces needs to be searched.
<DPL> namespace = Talk | Thread createdby = AmirHP </DPL>
<DPL> titlematch = %/Manual% nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ namespace = Main | User | Draft resultsheader = Manual Pages: format = ,\n* [[%PAGE%|%TITLE%]]\n,, </DPL>
{{LinksTo|Plasma/Panels}}
<DPL> titlematch = Kopete/% notnamespace = Translations columns = 3 format = ,\n* [[%PAGE%|%TITLE%]],, </DPL>
<DPL> titlematch = Akonadi%/da notnamespace = Translations format = ,\n* [[%PAGE%|%TITLE%]],, </DPL>
<DPL> titlematch = % namespace = Archive columns = 2 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages in the Archive namespace. These are:\n </DPL>
<DPL> titlematch = % category = Noindexed_pages columns = 2 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages in the Archive namespace. These are:\n </DPL>
"As for DPL. If you hit a page with ?action=purge attached to the URL (i.e. http://en.wikinews.org/wiki/Template:Latest_news?action=purge ), it will dump all the removed pages."
<DPL> titlematch = %_(%) notcategory = Template notnamespace = Thread notnamespace = Summary columns = 2 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages (partly) remaining in old-style translations. These are:\n </DPL>
<DPL> titlematch = % namespace = Main uses = Template:I18n/Language Navigation Bar columns = 3 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages that still display the old i18n language bar\n </DPL>
<DPL> nottitlematch = %_(%) namespace = Main uses = Template:I18n/Language Navigation Bar columns = 3 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% relevant pages that still display the old i18n language bar\n </DPL>
<DPL> namespace = Main lastrevisionbefore = 201007010000 columns = 2 ordermethod=lastedit format = ,\n* (%DATE%) [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages without recent updates\n </DPL>
<DPL> nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ titlematch = Amarok% namespace = Main columns = 1 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% Amarok pages, not counting translations\n </DPL>
<DPL> nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ namespace = MediaWiki columns = 3 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = These %TOTALPAGES% pages are in the Mediawiki namespace\n </DPL>
<DPL> titlematch = %/en notnamespace = Translations columns = 3 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages (partly) translated to English. These are:\n </DPL>