Difference between revisions of "Template:Pagelink"

From OpenGL Wiki
Jump to: navigation, search
(Attempt to add text descriptions.)
(fix for the default link.)
Line 8: Line 8:
  
 
</noinclude><includeonly>{{#switch:{{PAGENAME}}
 
</noinclude><includeonly>{{#switch:{{PAGENAME}}
|{{{1}}} = '''{{#if: {{{2|}}} | {{{2}}} | {{{1}}} }}'''
+
|{{{1}}} = '''{{#if: {{{2}}} | {{{2}}} | {{{1}}} }}'''
|[[{{{1}}}|{{{2|}}}]]
+
|#default = [[{{{1}}}]]
 
}}</includeonly>
 
}}</includeonly>

Revision as of 21:12, 4 October 2012

This template is for linking to pages, but only if the target page is not the current page. If it is the current page, then we just bold the text of the link.

For example: {{pagelink|Vertex Specification}} links like this: Vertex Specification.

However: {{pagelink|pagelink}} links like this: pagelink.

Can also have a text description: {{pagelink|pagelink|desc}}, which links like this: desc