সমললৈ যাওক

সাঁচ:Search archives/doc

অসমীয়া ৱিকিপিডিয়াৰ পৰা

Simple transclusion {{search archives}} uses the tagged page as a prefix. Default Prefixes contain the search to the article and its subpages. For example, when placed on Wikipedia talk:Talk pages, the search text for "foo" looks like: [foo prefix:Wikipedia talk:Talk pages ].

This usage may not be satisfactory, for example if one wants to search subpages of Wikipedia:Talk pages rather than subpages of its talk page, Wikipedia talk:Talk pages, which the above form does. Using Template:Archive banner may be a solution, as it allows parameters to be modified in the template tag.

  • One solution is to use the parameter prefix as follows:
|prefix=Wikipedia talk:WikiProject Cats
please note: the name is the page name, not the URL. ie., not the name with "_", but the name with blanks - as in the example above.
to specify multiple prefixes, separate the prefixes with {{!}}, i.e.:
|prefix=Wikipedia talk:WikiProject Cats{{!}}Talk:Cat/


  • Another remedy is to substitute this template, after which the prefix needs to be changed by hand to point to the desired search prefix: adding {{subst:search archives}} and save the change gets the code:
{{mbox
|type=notice
|small=
|image=[[File:Crystal kview.png|50px|Search]]
|imageright=[[File:Crystal kview.png|50px|Search]]
|smallimage=none
|smallimageright=none
|textstyle=text-align:center;
|text=<inputbox>
type=fulltext
prefix={{FULLPAGENAMEE}}
width={{#ifeq:{{{small|}}}|yes|15|30}}
searchbuttonlabel=Search talk archives
</inputbox>
}}

To customise, simply change prefix={{FULLPAGENAMEE}} to prefix=articlename, where articlename indicates the proper superpage, under which all subpages will be searched.