Template:WildStar/api: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Adds a link an API reference page to a wiki page. Optionally create complex links and ids for technical pages. See also {{t|id}} for API links on special pages. ;Usage :1= [t...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{ {{PAGENAME}}|ns={{BASEPAGENAME}}}} | |||
Adds a link an API reference page to a wiki page. Optionally create complex links and ids for technical pages. See also {{t|id}} for API links on special pages. | Adds a link an API reference page to a wiki page. Optionally create complex links and ids for technical pages. See also {{t|id}} for API links on special pages. | ||
Line 11: | Line 12: | ||
;Examples | ;Examples | ||
<pre>{{api||GameLib|GetPlayerUnit}}</pre> | <pre>{{api||GameLib|GetPlayerUnit}}</pre> | ||
{{ | {{ {{BASEPAGENAME}}/api||GameLib|GetPlayerUnit|ns=WildStar}} | ||
<pre>{{api|CVAR|locale|languageId}}</pre> | <pre>{{api|CVAR|locale|languageId}}</pre> | ||
{{ | {{ {{BASEPAGENAME}}/api|CVAR|locale|languageId|ns=WildStar}} | ||
<pre>{{api|TYPE|unit}}</pre> | <pre>{{api|TYPE|unit}}</pre> | ||
{{ | {{ {{BASEPAGENAME}}/api|TYPE|unit|ns=WildStar}} | ||
<pre>{{api|TYPE|unit|GetFaction}}</pre> | <pre>{{api|TYPE|unit|GetFaction}}</pre> | ||
{{ | {{ {{BASEPAGENAME}}/api|TYPE|unit|GetFaction|ns=WildStar}} | ||
<pre>{{api|EVENT|ToggleQuestLog}}</pre> | <pre>{{api|EVENT|ToggleQuestLog}}</pre> | ||
{{ | {{ {{BASEPAGENAME}}/api|EVENT|ToggleQuestLog|ns=WildStar}} | ||
<pre>{{api|EVENT|Apollo|ToggleQuestLog}}</pre> | <pre>{{api|EVENT|Apollo|ToggleQuestLog}}</pre> | ||
{{ | {{ {{BASEPAGENAME}}/api|EVENT|Apollo|ToggleQuestLog|ns=WildStar}} | ||
;Options | ;Options | ||
Line 43: | Line 44: | ||
---- | ---- | ||
;Template | ;Template | ||
<onlyinclude><!-- | <onlyinclude><includeonly><!-- | ||
-->{{#vardefine:sub|{{{ns|{{ | -->{{#vardefine:sub|{{{ns|{{#var:sub|{{NAMESPACE}}}}}}}}}<!-- | ||
-->{{#vardefine:t1|{{#switch:{{{1|}}}<!-- alt names | -->{{#vardefine:t1|{{#switch:{{{1|}}}<!-- alt names | ||
Line 63: | Line 64: | ||
-->}}}}}}}}<!-- | -->}}}}}}}}<!-- | ||
--></onlyinclude> | --></includeonly></onlyinclude> |
Latest revision as of 07:40, 9 August 2023
Adds a link an API reference page to a wiki page. Optionally create complex links and ids for technical pages. See also {{id}} for API links on special pages.
- Usage
- 1= [text] - name for page link, text, and id. Not used in text or id, if parts 2, 3 or 4 are used
- 2= [text] - second part
- 3= [text] - third part
- 4= [text] - fourth part
- t= [member,method] (Optional) - parts delimiter for text and id. Only added between parts 2, 3 and 4. Default is member.
- ns= [text] (Optional) - base page name for parent subpage to use. Like 'WoW' or 'WildStar'. Default is same as the including pages current namespace.
- Examples
{{api||GameLib|GetPlayerUnit}}
{{api|CVAR|locale|languageId}}
{{api|TYPE|unit}}
{{api|TYPE|unit|GetFaction}}
{{api|EVENT|ToggleQuestLog}}
{{api|EVENT|Apollo|ToggleQuestLog}}
- Options
- 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 TYPE - A API types api page link. Defaults to t=method (:). Omits |2= in link text if 3 or 4 parts
- API EVENT - A API events api page link. Defaults to t=member (.). Omits |2= in link text if 3 or 4 parts
- CVAR - A CVars page link. Defaults to t=member (.).
- APIT or TYPE - short-hand for API TYPE. Otherwise works the same and produces same links.
- APIE or EVENT - short-hand for API EVENT. Otherwise works the same and produces same links.
- Results samples
- {{api||Apollo}} - link: API Apollo, text: Apollo
- {{api||Apollo|Bob}} - link: API Apollo Bob, text: Apollo.Bob
- {{api|CVAR|assistAttack}} - link: CVAR assistAttack, text: assistAttack
- {{api|CVAR|ui|setting}} - link: CVAR ui.setting, text: ui.setting
- {{api|API|Apollo|SetAlpha}} - link: API Apollo SetAlpha, text: Apollo.SetAlpha
- {{api|API|Apollo|SetAlpha|t=method}} - link: API Apollo SetAlpha, text: Apollo:SetAlpha
- Template