How To Make Redirects: Difference between revisions

From Drunkapedia
Jump to: navigation, search
imported>Tlosk
(changed image redirect behavior)
imported>Arkalor
(moved How To Make Redirects to Help:How To Make Redirects: Moving to the Help namespace)
 
Line 1: Line 1:
{{RightToC}}
#REDIRECT [[Help:How To Make Redirects]]
== Redirect a Search Term ==
This may serve as some help to those of you who are unsure of how to create redirects (i.e: when someone searches for "alch" and there exists a page for Alchemy they will see a page does not exist page, however you can create a page that redirects a search for "alch" to the Alchemy page.
 
[[Image:redirect1.gif|right|thumb|500px| Example search result for "alch"]]
 
 
To accomplish this, first you would search for "alch", then you would choose create this page.
 
You would then add the following code to the "alch" page:
 
----
<code><nowiki>#Redirect [[Alchemy]]</nowiki></code>
----
 
Now whenever a user searched for the term "alch" they would get the Alchemy page instead.
 
This has many, many practical uses and serves to make navigating a good wiki much more streamlined, so when you create a page that has common abbreviations, consider redirecting those abbreviations to your intended content page.
 
== Redirect an Image ==
Previously you could add a redirect to an image's file page and then clicking on the image anywhere it was used would send you to the redirect rather than the file page. After the upgrade to Mediawiki 1.14 this no longer works.
 
Instead you can now use the link parameter to direct to another page when the image is clicked. This parameter must be set each time the image is used. Some templates will automatically set this parameter, such as {{tl|Icon}}.
 
For example:
 
<pre>
[[File:Pyreal Mote Icon.png|link=Pyreal Mote]] [[File:Pyreal Mote Icon.png|link=Golem]]
</pre>
 
would display as:
 
[[File:Pyreal Mote Icon.png|link=Pyreal Mote]] [[File:Pyreal Mote Icon.png|link=Golem]]
 
Note that even though the same image is used both times, the first image will take you to [[Pyreal Mote]] when clicked while the second will take you to [[Golem]]. The popup text will always the same as the link. See [[How To Use Images]] for more information.
 
== Redirect a Misspelling ==
In general redirects for misspellings are discouraged, however you are free to use your judgment in deciding whether it would be a good idea in a specific case.
 
== Categorize a Redirect ==
In some situations it may be desirable to categorize individual redirects. For example, alternative names of quests may redirect to a single writeup but it would be desirable to categorize each name as a quest. This way all the name variations will show up when searching through [[:Category:Quest]]. Another example would be categorizing Acid Lure I to VI each as [[:Category:Item Enchantment Spell]] even though they all redirect to the Spell List page [[Acid Lure (Spell)]].
 
'''Warning:''' The mediawiki parsing engine will ignore any text past the first line of a redirect page. This means all category tags must be on the same line as the redirect or they will be ignored.
 
<pre>
CORRECT:
 
#Redirect [[Acid Lure (Spell)]][[Category:Item Enchantment Spell]]
 
 
INCORRECT (WILL NOT BE CATEGORIZED):
 
#Redirect [[Acid Lure (Spell)]]
 
[[Category:Item Enchantment Spell]]
</pre>
 
[[Category:Help]]

Latest revision as of 19:41, 8 April 2014