Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
Template:Api2
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
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= [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 <pre>{{api||GameLib|GetPlayerUnit}}</pre> {{api2||GameLib|GetPlayerUnit|ns=WildStar}} <pre>{{api|CVAR|locale|languageId}}</pre> {{api2|CVAR|locale|languageId|ns=WildStar}} <pre>{{api|TYPE|unit}}</pre> {{api2|TYPE|unit|ns=WildStar}} <pre>{{api|TYPE|unit|GetFaction}}</pre> {{api2|TYPE|unit|GetFaction|ns=WildStar}} <pre>{{api|EVENT|ToggleQuestLog}}</pre> {{api2|EVENT|ToggleQuestLog|ns=WildStar}} <pre>{{api|EVENT|Apollo|ToggleQuestLog}}</pre> {{api2|EVENT|Apollo|ToggleQuestLog|ns=WildStar}} ;Options :1= Special link part names: :* 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 [[{{BASEPAGENAME}}/API types|API types]] api page link. Defaults to t=method (:). Omits |2= in link text if 3 or 4 parts :* API EVENT - A [[{{BASEPAGENAME}}/API events|API events]] api page link. Defaults to t=member (.). Omits |2= in link text if 3 or 4 parts :* CVAR - A [[{{BASEPAGENAME}}/CVars|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 :<nowiki>{{api||Apollo}}</nowiki> - link: API Apollo, text: Apollo :<nowiki>{{api||Apollo|Bob}}</nowiki> - link: API Apollo Bob, text: Apollo.Bob :<nowiki>{{api|CVAR|assistAttack}}</nowiki> - link: CVAR assistAttack, text: assistAttack :<nowiki>{{api|CVAR|ui|setting}}</nowiki> - link: CVAR ui.setting, text: ui.setting :<nowiki>{{api|API|Apollo|SetAlpha}}</nowiki> - link: API Apollo SetAlpha, text: Apollo.SetAlpha :<nowiki>{{api|API|Apollo|SetAlpha|t=method}}</nowiki> - link: API Apollo SetAlpha, text: Apollo:SetAlpha [[Category:WildStar development templates|{{PAGENAME}}]][[Category:Link helper templates]] ---- ;Template <onlyinclude><!-- -->{{#vardefine:sub|{{{ns|{{BASEPAGENAME}}}}}}}<!-- -->{{#vardefine:t1|{{#switch:{{{1|}}}<!-- alt names -->|APIT|TYPE=API TYPE<!-- assume TYPE is API TYPE -->|APIE|EVENT=API EVENT<!-- assume TYPE is API TYPE -->|=API<!-- -->|#default={{{1|}}}}}<!-- -->}}<!-- -->{{#vardefine:tDEL|{{#switch:{{#var:t1}}|API|API EVENT|CVAR=member|#default=method}}}}<!-- default delimiter -->{{#vardefine:tDEL|{{#switch:{{{t|{{#var:tDEL}}}}}|member=.|method=<nowiki>:</nowiki>}}}}<!-- delimiter override -->{{#vardefine:tLT2|{{#switch:{{#var:t1}}|API|API TYPE={{{2|}}}|#default={{{2|}}}}}}}<!-- link text for part 2 -->{{#if:{{{4|}}}|[[{{#var:sub}}/{{#var:t1}} {{{2}}} {{{3}}} {{{4}}}|{{#var:tLT2}}{{#var:tDEL}}{{{3}}}{{#var:tDEL}}{{{4}}}]]|<!-- -->{{#if:{{{3|}}}|[[{{#var:sub}}/{{#var:t1}} {{{2}}} {{{3}}}|{{#var:tLT2}}{{#var:tDEL}}{{{3}}}]]|<!-- -->{{#if:{{{2|}}}|[[{{#var:sub}}/{{#var:t1}} {{{2}}}|{{{2}}}]]|<!-- -->{{#if:{{{1|}}}|[[{{#var:sub}}/{{{1}}}|{{{1}}}]]|<!-- -->}}}}}}}}<!-- --></onlyinclude>
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Api2
(
edit
)
Template:T
(
edit
)
Template:T/piece
(
edit
)