Template:Userfunc: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(9 intermediate revisions by 7 users not shown)
Line 1: Line 1:
''Use this at the top of all [[User defined functions]] information pages (not WoW API or Widget pages!).'' Any pages with this template will be added to [[:Category:User defined functions]] and [[:Category:Snippets]].


;Syntax
* toc [1|0] - default is 0
[[Category:Interface customization templates|{{PAGENAME}}]]
----
;Template
<onlyinclude>{{notebox|This page documents a [[User defined functions|''user-defined function'']] that you can copy and paste into your addon. Replace PREFIX with your addon or lib prefix to avoid conflicts between different versions of these functions.|float=none|width=auto}}<!--
-->{{#ifeq:{{#var:tTYPE}}|USERAPI|__NOTOC__|{{#ifeq:{{{toc|0}}}|0|__NOTOC__|{{tocright}}}}}}<!--
-->{{#ifeq:{{PAGENAME}}|User defined functions||&larr; [[User defined functions]]<!--
  -->{{#ifeq:{{#var:tTYPE}}|USERAPI|&nbsp;&lt;&nbsp;[[User defined functions#{{#var:tNAME}}|{{#var:tNAME}}]]}}}}<div style="float: right; margin-left: 2em; margin-bottom: 1em;">{{apinav|toc={{{toc|0}}}}}
{{#vardefine:tTYPE|{{{1|{{#sub:{{PAGENAME}}|0|7}}}}}}}{{#vardefine:tNAME|{{#ifeq:{{#var:tTYPE|}}|USERAPI|{{#sub:{{PAGENAME}}|8|0}}|{{PAGENAME}}}}}}
<div style="margin-left: 1em; margin-right: 1em;"><small>&rarr; [[:Category:User defined functions|Snippets]]</small></div></div><includeonly>{{#ifeq:{{PAGENAME}}|User defined functions|[[Category:UI Snippets]]|}}[[Category:User defined functions]][[Category:Snippets]]{{#if:{{{nosort|}}}||{{#ifeq:{{#var:tTYPE}}|USERAPI|{{DEFAULTSORT:{{#var:tNAME}}}}|}}}}</includeonly></onlyinclude>

Latest revision as of 07:47, 18 May 2020

Use this at the top of all User defined functions information pages (not WoW API or Widget pages!). Any pages with this template will be added to Category:User defined functions and Category:Snippets.

Syntax
  • toc [1|0] - default is 0

Template
This page documents a user-defined function that you can copy and paste into your addon. Replace PREFIX with your addon or lib prefix to avoid conflicts between different versions of these functions.

User defined functions