49
edits
(Created page with "''Use on text which needs a reference-able html 'id', for links back to a specific spot in a page, when a page 'section' is inappropriate. For example, items in a list like fo...") |
(Created page with "Adds a link with an html id= to a wiki page, that is referable via link with an # (anchor). Optionally create complex links and ids for technical pages. See {{t|WildStar/api}}...") |
||
| Line 1: | Line 1: | ||
Adds a link with an html id= to a wiki page, that is referable via link with an # (anchor). Optionally create complex links and ids for technical pages. See {{t|api}} or [[:Category:Link helper templates]] for helper templates for regular links. | Adds a link with an html id= to a wiki page, that is referable via link with an # (anchor). Optionally create complex links and ids for technical pages. See {{t|WildStar/api}} or [[:Category:Link helper templates]] for helper templates for regular links. | ||
;Usage | ;Usage | ||
| Line 10: | Line 10: | ||
;Example | ;Example | ||
Link accessible via [[#AMP:Detonate]] (click and page will move there) | Link accessible via [[#AMP:Detonate]] (click and page will move there) | ||
<pre>{{id|AMP:Detonate}}</pre> | <pre>{{../id|AMP:Detonate}}</pre> | ||
{{id|AMP:Detonate}} | {{../id|AMP:Detonate|ns=WildStar}} | ||
;Options | ;Options | ||
:1= Special link part names: | :1= Special link part names: | ||
:* API - A [[UI API]] api page link. Defaults to t=member (.). Omits |2= in link text if 3 or 4 parts | :* API - A [[{{BASEPAGENAME}}/UI API|UI API]] api page link. Defaults to t=member (.). Omits |2= in link text if 3 or 4 parts | ||
:* API TYPE - A [[API types]] page link. Defaults to t=method (:). Omits |2= in link text if 3 or 4 parts | :* API TYPE - A [[{{BASEPAGENAME}}/API types|API types]] page link. Defaults to t=method (:). Omits |2= in link text if 3 or 4 parts | ||
:* API EVENT - A [[API events]] page link. Defaults to t=member (.). Omits del |2= in link text if 3 or 4 parts | :* API EVENT - A [[{{BASEPAGENAME}}/API events|API events]] page link. Defaults to t=member (.). Omits del |2= in link text if 3 or 4 parts | ||
:* CVAR - A [[CVars]] page link. Defaults to t=member (.). | :* CVAR - A [[{{BASEPAGENAME}}/CVars|CVars]] page link. Defaults to t=member (.). | ||
:* APIT - short-hand for ''API TYPE''. Otherwise works the same and produces same links. | :* APIT - short-hand for ''API TYPE''. Otherwise works the same and produces same links. | ||
:* APIE - short-hand for ''API EVENT''. Otherwise works the same and produces same links. | :* APIE - short-hand for ''API EVENT''. Otherwise works the same and produces same links. | ||
| Line 30: | Line 30: | ||
:<nowiki>{{id|API|Apollo|SetAlpha|t=method}}</nowiki> - link: API Apollo SetAlpha, id: Apollo:SetAlpha, text: Apollo:SetAlpha | :<nowiki>{{id|API|Apollo|SetAlpha|t=method}}</nowiki> - link: API Apollo SetAlpha, id: Apollo:SetAlpha, text: Apollo:SetAlpha | ||
:{{id|CVAR|video|fullscreen}}(bFullscreen) | :{{../id|CVAR|video|fullscreen}}(bFullscreen) | ||
:{{id|APIE|UI_HealthChanged}}(newValue,maxCharacterHealth) | :{{../id|APIE|UI_HealthChanged}}(newValue,maxCharacterHealth) | ||
:{{../id||bagId}}(newValue,maxCharacterHealth) | |||
[[Category: | [[Category:WildStar development templates|{{PAGENAME}}]] | ||
---- | ---- | ||
;Template | ;Template | ||
<onlyinclude><!-- | <onlyinclude><!-- | ||
-->{{#vardefine:sub|{{{ns|{{BASEPAGENAME}}}}}}}<!-- | |||
-->{{#vardefine:t1|{{#switch:{{{1|}}}|APIT=API TYPE|APIE=API EVENT|#default={{{1|}}}}}}}<!-- alternate names | -->{{#vardefine:t1|{{#switch:{{{1|}}}|APIT=API TYPE|APIE=API EVENT|#default={{{1|}}}}}}}<!-- alternate names | ||
| Line 44: | Line 47: | ||
-->{{#vardefine:tLT2|{{#switch:{{#var:t1}}|API|API TYPE={{#var:tDEL}}|API EVENT=|CVAR={{{2}}}{{#var:tDEL}}|#default={{#var:tDEL}}{{{2|}}}}}}}<!-- | -->{{#vardefine:tLT2|{{#switch:{{#var:t1}}|API|API TYPE={{#var:tDEL}}|API EVENT=|CVAR={{{2}}}{{#var:tDEL}}|#default={{#var:tDEL}}{{{2|}}}}}}}<!-- | ||
-->{{#if:{{{4|}}}|<span id="{{{2}}}{{#var:tDEL}}{{{3}}}{{#var:tDEL}}{{{4}}}">[[{{#var:t1}} {{{2}}} {{{3}}} {{{4}}}|{{#var:tLT2}}{{{3}}}{{#var:tDEL}}{{{4}}}]]</span>|<!-- | -->{{#if:{{{4|}}}|<span id="{{{2}}}{{#var:tDEL}}{{{3}}}{{#var:tDEL}}{{{4}}}">[[{{#var:sub}}/{{#var:t1}} {{{2}}} {{{3}}} {{{4}}}|{{#var:tLT2}}{{{3}}}{{#var:tDEL}}{{{4}}}]]</span>|<!-- | ||
-->{{#if:{{{3|}}}|<span id="{{{2}}}{{#var:tDEL}}{{{3}}}">[[{{#var:t1}} {{{2}}} {{{3}}}|{{#var:tLT2}}{{{3}}}]]</span>|<!-- | -->{{#if:{{{3|}}}|<span id="{{{2}}}{{#var:tDEL}}{{{3}}}">[[{{#var:sub}}/{{#var:t1}} {{{2}}} {{{3}}}|{{#var:tLT2}}{{{3}}}]]</span>|<!-- | ||
-->{{#if:{{{2|}}}|<span id="{{{2}}}">[[{{#var:t1}} {{{2}}}|{{{2}}}]]</span>|<!-- | -->{{#if:{{{2|}}}|<span id="{{{2}}}">[[{{#var:sub}}/{{#var:t1}} {{{2}}}|{{{2}}}]]</span>|<!-- | ||
-->{{#if:{{{1|}}}|<span id="{{{1}}}">[[{{{1}}}]]</span>|}}}}}}}}</onlyinclude> | -->{{#if:{{{1|}}}|<span id="{{{1}}}">[[{{#var:sub}}/{{{1}}}]]</span>|}}}}}}}}</onlyinclude> | ||