Template

Difference between revisions of "Redirectstohere/doc"

From Joomla! Documentation

< Template:Redirectstohere
m
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
==Purpose==
 
==Purpose==
The purpose of this template :is to establish and document a section title backlink to and from a redirect page title that links to said section or page.
+
The purpose of the ''redirect'' templates is to establish and document a section title backlink to and from a redirect page title that links to said section or page. This usage will alert and prevent a subsequent editor from altering a section title and inadvertently breaking the link and whatever articles reference same.
  
:This usage will alert and prevent a subsequent editor from altering a section title and inadvertently breaking the link and whatever articles reference same.
+
Placement at the top of the article is useful as well, {{tl|redirect}} and {{tl|redirectstohere}} are best suited at that position to inform ''readers'' of an article.
 
+
:'''Always wrap this templates in <nowiki><noinclude></nowiki> tags''' to prevent the message from appearing in composite documents.
Placement at the top of the article is useful as well, {{tl|redirectstohere}} is best suited at that position. '''A maximum of nine pages''' can be provided. Backlinks are not added.
 
 
 
#{{redirectstohere|Plugins}}
 
#{{redirectstohere|Plugins|Modules}}
 
#{{redirectstohere|Plugins|Modules|Templates}}
 
#{{redirectstohere|Plugins|Modules|Templates|Languages}}
 
#{{redirectstohere|Plugins|Modules|Templates|Languages|Extensions}}
 
#{{redirectstohere|Plugins|Modules|Templates|Languages|Extensions|Mambots}}
 
#{{redirectstohere|Plugins|Modules|Templates|Languages|Extensions|Mambots|Scripts}}
 
#{{redirectstohere|Plugins|Modules|Templates|Languages|Extensions|Mambots|Scripts|Foo}}
 
#{{redirectstohere|Plugins|Modules|Templates|Languages|Extensions|Mambots|Scripts|Foo|Bar}}
 
  
 
==Usage==
 
==Usage==
This template is used '''after a section heading''' on an article page and it uses the odd numeric parameter '''<code> <nowiki>{{{1}}}</nowiki></code>,''' which will be not displayed in the tagged article as the reference title of the section. The next following even number is the name of the matching redirect page.  
+
The templates are used '''after a section heading''' on an article page and it uses the odd numeric parameter '''<code> <nowiki>{{{1}}}</nowiki></code>,''' which will be not displayed in the tagged article as the reference title of the section. The next following even number is the name of the matching redirect page.  
  
 
Subsequent pages may also be listed as additional "Numbered Parameters" to provide a reference to other redirect pages which link to that page or section, but only the Even numbered parameters will display, so dummy arguments might be needed to pad out multiple references to a single section, or the title should be repeated for each even occurrence.
 
Subsequent pages may also be listed as additional "Numbered Parameters" to provide a reference to other redirect pages which link to that page or section, but only the Even numbered parameters will display, so dummy arguments might be needed to pad out multiple references to a single section, or the title should be repeated for each even occurrence.
  
 
===Parameters===
 
===Parameters===
 +
For use of numeric parameters 1 - 9 see examples below.
 
;<nowiki>{{{hide=yes}}}</nowiki>
 
;<nowiki>{{{hide=yes}}}</nowiki>
 
: adds a style attribute to hide the output. See notes below.
 
: adds a style attribute to hide the output. See notes below.
Line 29: Line 19:
 
: adds ''css-class'' to the class attribute (dablink) of the container div.
 
: adds ''css-class'' to the class attribute (dablink) of the container div.
  
===Notes===
+
==Examples==
The <var>hide</var> parameter should only be usedif the template is added to a section to prevent visual clutter. An editor will still see the template as a procaution of changing a section title and thereby breaking (possibly many) links from other pages.
+
In the article "Tides", the section title ''Spring Tides'' and ''Neap tides'' might be declared from their matching redirects:
:'''Always wrap this templates in <nowiki><noinclude></nowiki> tags!'''
 
 
 
===Examples===
 
In the article "Tides", the section title Spring Tides and Neap tides might be declared from their matching redirects:
 
 
<pre>
 
<pre>
 
ex:1 -- redirect 'Neap tide' goes to [[tide#Neap tide]]
 
ex:1 -- redirect 'Neap tide' goes to [[tide#Neap tide]]
Line 49: Line 35:
 
   -- to page Tide top, so lists all.
 
   -- to page Tide top, so lists all.
 
</pre>
 
</pre>
 +
 +
'''{{tl|redirect}}'''<br/>
 +
{{xpd|redirect|Application}}
 +
{{xpd|redirect|Back-end|the user level|Administrator (User)}}
 +
 +
<br/>'''{{tl|redirects}}'''<br/>
 +
<nowiki>{{redirects|Some section|PAGE}}</nowiki>
 +
{{redirects|Some section|PAGE}}
 +
<nowiki>{{redirects|Some section|PAGE|Some other section|PAGE2}}</nowiki>
 +
{{redirects|Some section|PAGE|Some other section|PAGE2}}
 +
 +
<br/>'''{{tl|redirectstohere}}''' accepts ''a maximum of nine pages''.
 +
#{{redirectstohere|Plugins}}
 +
#{{redirectstohere|Plugins|Modules}}
 +
#{{redirectstohere|Plugins|Modules|Templates}}
 +
#{{redirectstohere|Plugins|Modules|Templates|Languages}}
 +
#{{redirectstohere|Plugins|Modules|Templates|Languages|Components}}
 +
#{{redirectstohere|Plugins|Modules|Templates|Languages|Components|Extensions}}
 +
#{{redirectstohere|Plugins|Modules|Templates|Languages|Components|Extensions|Mambots}}
 +
#{{redirectstohere|Plugins|Modules|Templates|Languages|Components|Extensions|Mambots|Scripts}}
 +
#{{redirectstohere|Plugins|Modules|Templates|Languages|Components|Extensions|Mambots|Scripts|Foo Bar}}
 +
 
<!-- REMOVE BLANKS in includeonly-tags and edit *calling* TEMPLATE CATEGORIES BELOW THIS LINE -->
 
<!-- REMOVE BLANKS in includeonly-tags and edit *calling* TEMPLATE CATEGORIES BELOW THIS LINE -->
 
<includeonly>[[Category:Wiki Macros|{{PAGENAME}}]]</includeonly>
 
<includeonly>[[Category:Wiki Macros|{{PAGENAME}}]]</includeonly>
 +
 +
===Notes===
 +
The <var>hide</var> parameter should only be used if the template is added to a section to prevent visual clutter. An editor will still see the template as a procaution of changing a section title and thereby breaking (possibly many) links from other pages. One may argue that adding a regular HTML comments may provide the same information, but using the template allows ''what links here'' to locate the tagged articles; an HTML comment does not.
  
 
== See also ==
 
== See also ==

Latest revision as of 06:15, 16 May 2008

This is a documentation subpage for Template:Redirectstohere.
It contains usage information, categories and other content that is not part of the original template page.
To view the template page itself, see Template:Redirectstohere.

Purpose[edit]

The purpose of the redirect templates is to establish and document a section title backlink to and from a redirect page title that links to said section or page. This usage will alert and prevent a subsequent editor from altering a section title and inadvertently breaking the link and whatever articles reference same.

Placement at the top of the article is useful as well, {{redirect}} and {{redirectstohere}} are best suited at that position to inform readers of an article.

Always wrap this templates in <noinclude> tags to prevent the message from appearing in composite documents.

Usage[edit]

The templates are used after a section heading on an article page and it uses the odd numeric parameter {{{1}}}, which will be not displayed in the tagged article as the reference title of the section. The next following even number is the name of the matching redirect page.

Subsequent pages may also be listed as additional "Numbered Parameters" to provide a reference to other redirect pages which link to that page or section, but only the Even numbered parameters will display, so dummy arguments might be needed to pad out multiple references to a single section, or the title should be repeated for each even occurrence.

Parameters[edit]

For use of numeric parameters 1 - 9 see examples below.

{{{hide=yes}}}
adds a style attribute to hide the output. See notes below.
{{{border=css-class}}}
adds css-class to the class attribute (dablink) of the container div.

Examples[edit]

In the article "Tides", the section title Spring Tides and Neap tides might be declared from their matching redirects:

ex:1 -- redirect 'Neap tide' goes to [[tide#Neap tide]]
     -- Odd params are section titles.
{{redirects|Neap Tides|Neap tide}}

ex:2 -- two redirects go to the same section 
    (i.e. related material, not worthy of own topics) 
    So handled in same section: -- Odd params are section titles...
{{redirects|Neap Tides|Neap tide|Neap Tides|Spring tide}}
      so the Section title "Neap Tides" covers both!

{{redirectstohere|Neap tide|Spring tide|Tides|Storm tide}} 
   -- to page Tide top, so lists all.

{{redirect}}

{{redirect|Application}} gives

{{redirect|Back-end|the user level|Administrator (User)}} gives


{{redirects}}
{{redirects|Some section|PAGE}}

{{redirects|Some section|PAGE|Some other section|PAGE2}}


{{redirectstohere}} accepts a maximum of nine pages.


Notes[edit]

The hide parameter should only be used if the template is added to a section to prevent visual clutter. An editor will still see the template as a procaution of changing a section title and thereby breaking (possibly many) links from other pages. One may argue that adding a regular HTML comments may provide the same information, but using the template allows what links here to locate the tagged articles; an HTML comment does not.

See also[edit]

Stylesheet[edit]

div.dablink
.redirectstohere