Template:Api2

From AddOn Studio
Jump to navigation Jump to search

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}}

GameLib.GetPlayerUnit

{{api|CVAR|locale|languageId}}

locale.languageId

{{api|TYPE|unit}}

unit

{{api|TYPE|unit|GetFaction}}

unit:GetFaction

{{api|EVENT|ToggleQuestLog}}

ToggleQuestLog

{{api|EVENT|Apollo|ToggleQuestLog}}

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