Template:FP link/doc

From 7 Days to Die Wiki
Jump to: navigation, search
Template-info.png Documentation


This template is for creating the styled links used within boxes on the front page: 7 Days to Die Wiki. It relies heavily on CSS in MediaWiki:Hydra.css / MediaWiki:Hydradark.css and MediaWiki:Mobile.css.

Usage[edit source]

Any group of {{FP link}} templates must be enclosed by an element with the class fplinks.

Internal (wiki) links[edit source]

{{FP link | destination | display text /optional
| image = file link /optional
| width = <small/normal/wide/full> /optional
| imageonly = <true/false> /optional
| plain = <true/false> /optional
}}

External links[edit source]

{{FP link | url = destination | display text /optional
| image = file link /optional
| width = <small/normal/wide/full> /optional
| imageonly = <true/false> /optional
| plain = <true/false> /optional
}}

Parameters[edit source]

Internal (wiki) links[edit source]

destination 
Destination wiki page. Required.
display text 
Optional text to display instead of the name of the destination page.

External links[edit source]

|url= 
The destination URL. Required for external links.
display text 
Optional text to display instead of the URL. If omitted, the full URL will be displayed.

Style parameters[edit source]

|image= 
Optional image, to be displayed above the link.
|width= 
Determines the size of the link box. code>small links take up to 20% of the width of the containing element. normal links take up to 25% of the width of the containing element. wide links take up to 33% of the containing element. full links take the entire width of the containing element. If omitted, defaults to normal.
|imageonly= 
When an image is specified, this determines whether to show only the image or both the image and the link. true will show only the image, false will show the link as well. If omitted, defaults to false.
|plain= 
This provides an option to remove backgrounds and borders for certain links. true will remove visible styles, false will use the default styles. If omitted, defaults to false.

Examples[edit source]

Links only[edit source]

<div class="fplinks">
{{FP link | Main Page | Normal}}
{{FP link | Main Page | Wide | width = wide}}
{{FP link | Main Page | Plain | plain = true}}

{{FP link | Main Page | Full width | width = full}}
</div>

With images[edit source]

<div class="fplinks">
{{FP link | Main Page | With image | image = Wiki.png}}
{{FP link | Main Page | Hidden text | image = Wiki.png | imageonly = true}}
{{FP link | Main Page | Plain | image = Wiki.png | plain = true}}
{{FP link | Main Page | Plain | image = Wiki.png | plain = true | imageonly = true}}

{{FP link | Main Page | Wide with image | image = Wiki.png | width = wide}}
{{FP link | Main Page | Wide hidden text | image = Wiki.png | width = wide | imageonly = true}}
</div>

This is the documentation page, it should be transcluded into the main template page. See Template:Doc for more information.