< Template:Link attributes

Revision as of 04:04, 30 May 2017 by Kenny2scratch (talk | contribs) (Made template documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation This is a documentation subpage for Template:Link attributes (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.

Note Note: This template only styles intra-wiki links.

Usage

{{link style}} applies CSS style to an intra-wiki link. It accepts four parameters:

  • 1 - the page being linked
  • 2 - the style of the link
  • 3 - the style of the link if the page being linked does not exist - optional
  • text - link text to show - optional

Link style

To change the style of a link:

[[Scratch Wiki]] vs. {{link style|Scratch Wiki|color:gray}}

Scratch Wiki vs. Scratch Wiki

Alternate link text style

To change the style of a link with custom link text:

[[Scratch Wiki|the Wiki]] vs. {{link style|Scratch Wiki|color:gray|text=the Wiki}}

the Wiki vs. the Wiki

Note that you must specify text= to have alternate link text.

Red link style

To change the style of a link to a nonexistent page:

[[No page here]] vs. {{link style|No page here|color:gray|color:magenta}}

No page here vs. No page here

Note that the style in the third parameter is applied, since the page does not exist.

Alternate red link text style

To change the style of a link to a nonexistent page with custom link text:

[[No page here|Nope]] vs. {{link style|No page here|color:gray|color:magenta|text=Nope}}

Nope vs. Nope

Here, all four parameters are put into use. The first parameter is the page itself, the second is the style for the link, the third is the style if the page doesn't exist, and text is the alternate text for the link.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.