Difference between revisions of "Template:FancyFormatLink"

From Wikispooks
Jump to navigation Jump to search
(test...)
 
m (Text replacement - "__NOCACHE__" to "")
 
(5 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
'''Usage:'''<br/>
 
'''Usage:'''<br/>
 
<font face="courier"><nowiki>{{</nowiki>{{PAGENAME}}|Document:Example document<nowiki>}}</nowiki></font>
 
<font face="courier"><nowiki>{{</nowiki>{{PAGENAME}}|Document:Example document<nowiki>}}</nowiki></font>
</noinclude><includeonly>{{#if: {{{1|}}}|{{Namespace detect
+
</noinclude><includeonly>{{#if: {{{1|}}}|[[image:{{Namespace detect
| document = [[image:Document.png|26px|link={{{1}}}]]&nbsp;[[{{{1}}}]]
+
<!-- Long list of icons, once for each namespace - might want to farm this out to another template -->
  | other = {{#ifexist: Image:{{#show: {{{1}}} |? Has objectClass2 }}.png | [[image:{{#show: {{{1}}} |? Has objectClass2 }}.png|26px|link={{{1}}}]]&nbsp;<font face="arial">[[{{{1}}}]]</font> | [[{{{1}}}]]}}
+
| document =document
| page  = Document:UK_Intelligence_And_Security_Report,_2003
+
| file    =image
}}}}</includeonly>
+
| help    =help
 +
| concept    =category
 +
| category    =category
 +
| wikipedia    =wikipedia
 +
| mediaWiki=MediaWiki
 +
| user    =user
 +
| form    =template
 +
| widget    =template
 +
| layer    =template
 +
| module  =template
 +
| template =template
 +
| property =property
 +
| project =wikispooks
 +
| talk    =talk
 +
| file talk    =talk
 +
| user talk    =talk
 +
| project talk    =talk
 +
| module talk    =talk
 +
| layer talk    =talk
 +
| template talk    =talk
 +
| mediaWiki    =talk
 +
| help talk    =talk
 +
| wikipedia talk    =talk
 +
| widget talk    =talk
 +
| category talk    =talk
 +
| concept talk    =talk
 +
| other   ={{#ifexist: Image:{{#show: {{{1}}} |? Has objectClass2 }}.png | {{#show: {{{1}}} |? Has objectClass2 }}|Page}}
 +
| page    ={{{1}}}}}.png|22px|link={{{1}}}]]<font face="arial">[[{{{1}}}|{{TrimNamespace|{{{1}}}}}]]</font>}}</includeonly>

Latest revision as of 09:52, 17 February 2018

This template marks up internal links in a fancy fashion. It is used e.g. by Template:Ratings/Output.
As well as using an unusual font (Arial) it shortens the link and uses an icon to represent the namespace.

Usage:
{{FancyFormatLink|Document:Example document}}