Template:WildStar/uiapi: Difference between revisions
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...") |
(Created page with "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. ;Usag...") |
||
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]]. | 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 9: | ||
;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: | [[Category:WildStar development templates|{{SUBPAGENAME}}]] | ||
---- | ---- | ||
;Template | ;Template | ||
<onlyinclude> | <onlyinclude><!-- | ||
-->{{#vardefine:tTYPE|{{#switch:{{#sub:{{ | -->{{#vardefine:sub|{{{ns|{{BASEPAGENAME}}}}}}}<!-- | ||
-->{{#vardefine:tSTYPE|{{#switch:{{#sub:{{ | |||
--><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:{{ | -->{{#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:{{ | -->{{#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 35: | ||
-->{{#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>→ [[:Category:{{#var:tCAT}}|{{#var:tCAT}}]]</small></div><!-- | --><div style="margin:0 .5em 0 1em;"><small>→ [[:Category:{{#var:sub}} {{#var:tCAT}}|{{#var:tCAT}}]]</small></div><!-- | ||
--><includeonly>[[Category:{{#var:tCAT}}]]</includeonly><!-- | --><includeonly>[[Category:{{#var:sub}} {{#var:tCAT}}]]</includeonly><!-- | ||
--></div>{{#ifeq:{{{tocright|}}}|0||<span class="ws-compact" style="font-size:.93em;{{#var:tTF}}">{{tocright}}</span>}}<!-- | --></div>{{#ifeq:{{{toc|}}}|0|__NOTOC__|{{#ifeq:{{{tocright|}} }|0||<span class="ws-compact" style="font-size:.93em;{{#var:tTF}}">{{tocright}}</span>}}}}<!-- | ||
-->{{#ifeq:{{ | -->{{#ifeq:{{SUBPAGENAME}}|{{#var:tTOP}}||<!-- if is a top list page, nada | ||
-->← [[{{#var:tTOP}}]]<!-- | -->← [[{{#var:sub}}/{{#var:tTOP}}|{{#var:tTOP}}]]<!-- top list page | ||
-->{{#ifeq:{{#var:tTYPE}}|api|<!-- | -->{{#ifeq:{{#var:tTYPE}}|api|<!-- API member pages | ||
--> < <!-- | --> < <!-- | ||
-->{{#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> | --></onlyinclude> |
Revision as of 02:01, 4 July 2020
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
← UI API