Template:WildStar/uiapi: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Created page with "''Use this at the top of all UI '''API''' pages. NOT for pages of a particular AddOn.'' Any pages with this template will be added to Category:UI API. [[Category:WS deve...")
 
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
Use this at the top of all global UI Lua API pages. See [[UI API]]. Any pages with this template will be added to [[:Category:UI API]].
{{ {{PAGENAME}}|ns={{BASEPAGENAME}}}}
Use this at the top of all global UI Lua API pages. See [[{{BASEPAGENAME}}/UI API|UI API]]. Any pages with this template will be added to [[:Category:WildStar UI API]].


;Usage
;Usage
Line 9: Line 10:
;Examples
;Examples
'API AuctionFrameAuction duration' displays link as 'AuctionFrameAuction:duration'
'API AuctionFrameAuction duration' displays link as 'AuctionFrameAuction:duration'
<pre>{{uiapi|t=method}}</pre>
<pre>{{\|uiapi|t=method}}</pre>
'API AuctionFrameAuction duration' displays link as 'AuctionFrameAuction.duration'
'API AuctionFrameAuction duration' displays link as 'AuctionFrameAuction.duration'
<pre>{{uiapi|t=member}}</pre>
<pre>{{{\|uiapi|t=member}}</pre>


[[Category:WS development templates|{{PAGENAME}}]]
[[Category:WildStar development templates|{{SUBPAGENAME}}]]
----
----
;Template
;Template
<onlyinclude><div style="float:right; margin-left:1em; margin-bottom:1em;">{{devnav}}<!--
<onlyinclude><includeonly><!--


-->{{#vardefine:tTYPE|{{#switch:{{#sub:{{PAGENAME}}|0|3}}|API=api|#default=}}}}<!--
-->{{#vardefine:sub|{{{ns|{{#var:sub|{{NAMESPACE}}}}}}}}}<!--
-->{{#vardefine:tSTYPE|{{#switch:{{#sub:{{PAGENAME}}|4|4}}|TYPE=type|EVEN=event|#default=}}}}<!--
 
--><div style="float:right; margin-left:1em; margin-bottom:1em;">{{ {{#var:sub}}/devnav}}<!--
 
-->{{#vardefine:tTYPE|{{#switch:{{#sub:{{SUBPAGENAME}}|0|3}}|API=api|#default=}}}}<!--
 
-->{{#vardefine:tSTYPE|{{#switch:{{#sub:{{SUBPAGENAME}}|4|4}}|TYPE=type|EVEN=event|#default=}}}}<!--
-->{{#vardefine:tTOP|{{#switch:{{#var:tSTYPE}}|event=API events|type=API types|#default=UI API}}}}<!--
-->{{#vardefine:tTOP|{{#switch:{{#var:tSTYPE}}|event=API events|type=API types|#default=UI API}}}}<!--
-->{{#vardefine:tNAME|{{#if:{{{name|}}}|{{{name|}}}|<!--
-->{{#vardefine:tNAME|{{#if:{{{name|}}}|{{{name|}}}|<!--
   -->{{#if:{{#var:tTYPE}}|{{#sub:{{PAGENAME}}|{{#switch:{{#var:tSTYPE}}|event=9|=4|#default=8}}}}|{{PAGENAME}}}}}}}}<!--
   -->{{#if:{{#var:tTYPE}}|{{#sub:{{SUBPAGENAME}}|{{#switch:{{#var:tSTYPE}}|event=9|=4|#default=8}}}}|{{SUBPAGENAME}}}}}}}}<!--
-->{{#vardefine:tMEMBER|{{#explode:{{#var:tNAME}}||-1}}}}<!--
-->{{#vardefine:tMEMBER|{{#explode:{{#var:tNAME}}||-1}}}}<!--
-->{{#vardefine:tOWNER|{{#explode:{{#var:tNAME}}||-{{#if:{{#var:tSTYPE}}|2|3}}}}}}<!--
-->{{#vardefine:tOWNER|{{#explode:{{#var:tNAME}}||-{{#if:{{#var:tSTYPE}}|2|3}}}}}}<!--
-->{{#vardefine:tPARENT|{{#sub:{{PAGENAME}}||-{{#len:{{#var:tMEMBER}}}}}}}}<!--
-->{{#vardefine:tPARENT|{{#sub:{{SUBPAGENAME}}||-{{#len:{{#var:tMEMBER}}}}}}}}<!--
-->{{#vardefine:tDEL|{{#switch:{{{t|{{#var:tSTYPE}}}}}|type|method=:|.}}}}<!--
-->{{#vardefine:tDEL|{{#switch:{{{t|{{#var:tSTYPE}}}}}|type|method=:|.}}}}<!--
-->{{#ifeq:{{#var:tTYPE}}|api|{{#vardefine:tNAME|{{#replace:{{#var:tNAME}}||{{#var:tDEL}}}}}}}}<!--
-->{{#ifeq:{{#var:tTYPE}}|api|{{#vardefine:tNAME|{{#replace:{{#var:tNAME}}||{{#var:tDEL}}}}}}}}<!--
Line 31: Line 37:
-->{{#vardefine:tTF|{{#switch:{{{t|{{#var:tSTYPE}}}}}|type|event=float:right;|#default=}}}}<!--
-->{{#vardefine:tTF|{{#switch:{{{t|{{#var:tSTYPE}}}}}|type|event=float:right;|#default=}}}}<!--


--><div style="margin:0 .5em 0 1em;"><small>&rarr; [[:Category:{{#var:tCAT}}|{{#var:tCAT}}]]</small></div><!--
--><div style="margin:0 .5em 0 1em;"><small>&rarr; [[:Category:{{#var:sub}} {{#var:tCAT}}|{{#var:tCAT}}]]</small></div><!--
--><includeonly>[[Category:{{#var:tCAT}}]]</includeonly><!--
 
--></div>{{#ifeq:{{{tocright|}}}|0||<span class="ws-compact" style="font-size:.93em;{{#var:tTF}}">{{tocright}}</span>}}<!--
--></div>{{#ifeq:{{{toc|}}}|1|{{#ifeq:{{{tocright|}}}|0||<span class="ws-compact" style="font-size:.93em;{{#var:tTF}}">{{tocright}}</span>}}|__NOTOC__}}<!--
-->{{#ifeq:{{FULLPAGENAME}}|{{#var:tTOP}}||<!--     if is a top list page, nada
-->{{#ifeq:{{SUBPAGENAME}}|{{#var:tTOP}}||<!--                     if is a top list page, nada
   -->&larr; [[{{#var:tTOP}}]]<!--                           top list page
   -->&larr; [[{{#var:sub}}:{{#var:tTOP}}|{{#var:tTOP}}]]<!--       top list page
   -->{{#ifeq:{{#var:tTYPE}}|api|<!--                 API member pages
   -->{{#ifeq:{{#var:tTYPE}}|api|<!--                               API member pages
     -->&nbsp;&lt;&nbsp;<!--
     -->&nbsp;&lt;&nbsp;<!--
     -->{{#if:{{#var:tOWNER}}<!--
     -->{{#if:{{#var:tOWNER}}<!--
       -->|[[{{#var:tPARENT}}#{{#var:tNAME}}|{{#var:tNAME}}]]<!--
       -->|[[{{#var:sub}}:{{#var:tPARENT}}#{{#var:tNAME}}|{{#var:tNAME}}]]<!--
       -->|[[{{#var:tTOP}}#{{#var:tNAME}}|{{#var:tNAME}}]]<!--
       -->|[[{{#var:sub}}:{{#var:tTOP}}#{{#var:tNAME}}|{{#var:tNAME}}]]<!--
     -->}}<!--
     -->}}<!--
   -->}}<!--
   -->}}<!--
-->}}<!--
-->}}<!--
--></onlyinclude>
 
-->{{#ifeq:{{NAMESPACE}}|Template||[[Category:{{#var:sub}} {{#var:tCAT}}]]}}<!--
 
--></includeonly></onlyinclude>

Latest revision as of 07:36, 9 August 2023

UI API

Use this at the top of all global UI Lua API pages. See UI API. Any pages with this template will be added to Category:WildStar UI API.

Usage
t= [member,method,type] (Optional) - Default is 'member'.
  • member - page is an API member, like 'table member' as 'table.member'.
  • method - page is an API method, like 'table member' as 'table:member'.
name= [text] (Optional) - Override the generated identifier name, useful for names with underscores.
Examples

'API AuctionFrameAuction duration' displays link as 'AuctionFrameAuction:duration'

{{\|uiapi|t=method}}

'API AuctionFrameAuction duration' displays link as 'AuctionFrameAuction.duration'

{{{\|uiapi|t=member}}

Template