Template:Addon: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(7 intermediate revisions by 7 users not shown)
Line 1: Line 1:
Adds a banner and puts the page in [[:Category:AddOns]] or [[:Category:Hosted AddOns]]. See also {{t|Infobox addon}}. ''Use {{t|addoninfo}} for regular wiki pages. Use {{t|Uiaddon}} for technical or development AddOn pages.''


''Changing this page will affect AddOns, AddOn Libraries, and Tools.''
;Usage
:1= (Optional)  override the usual banner title
:name= thing to call this, if not an 'AddOn'
:old= (Optional)  set to '1' to mark as abandoned or no longer working in current versions WoW
:hosted= (Optional)  set to '0' to mark as not 'hosted'
:subpage= (Optional) set to '1' to mark as 'subpage'
:banner= (Optional)  set to '0' to disable the 'cog' banner. normally should have banner for disambiguation
:library=|lib= (Optional)  set to '1' to mark as AddOn library or 'lib'.
[[Category:Article type templates|{{PAGENAME}}]]
----
;Template
<onlyinclude><!--
-->{{#vardefine:tNAME|{{#if:{{{name|}}}|{{{name|}}}|AddOn}}}}<!--
-->{{#vardefine:tNAMES|{{#if:{{{names|}}}|{{{names|}}}|AddOns}}}}<!--
-->{{#vardefine:tOLD|{{#if:{{{old|}}}|{{{old|}}}}}}}<!-- trim
-->{{#vardefine:tHOSTED|{{#ifeq:{{#if:{{{hosted|}}}|{{{hosted|}}}}}|0||Hosted}}}}<!-- trim, text tag to use if set
-->{{#vardefine:tSUBPAGE|{{#ifeq:{{#if:{{{subpage|}}}|{{{subpage|}}}}}|1|Sub-Page}}}}<!-- trim, text tag to use if set
-->{{#vardefine:tLIBRARY|{{#if:{{{lib|{{{library|}}}}}}|{{{lib|{{{library|}}}}}}}}}}<!-- trim
-->{{#vardefine:tLIBRARY|{{#ifeq:{{#var:tLIBRARY}}|1|Library|}}}}<!-- text tag to use if set
-->{{#vardefine:tCATEGORY|{{#var:tNAMES}} {{#if:{{#var:tSUBPAGE}}|Subpages}} {{#if:{{#var:tOLD}}|(Old)}}}}<!--
-->{{#ifeq:{{{banner|}}}|0||<div style="float:left; position:relative; top:-4px; left:-1px;"><!--
  -->[[File:Addonicon.gif|{{#var:tNAME}}|link={{#var:tNAME}}]]</div><!--
--><div style="text-align:center; font-family:Gill Sans,Calibri,sans-serif; font-size:2em; color:#ccB474; background-color:#282828; border:1px solid black; padding:.25em 3em .25em 1em;"><!--
  -->{{#if:{{{1|}}}|{{{1|}}}|<!--
  -->{{#if:{{#var:tHOSTED}}|WoWWiki Hosted|WoW}} {{#var:tNAME}} <!--
  -->{{#if:{{#var:tLIBRARY}}{{#var:tSUBPAGE}}|{{#var:tLIBRARY}} <!--
    -->{{#if:{{#var:tSUBPAGE}}|<span style="color:silver;">{{#var:tSUBPAGE}}</span>|Page}}|Page}} <!--
  -->{{#if:{{#var:tOLD}}|(Old)}}}}<!--
  --></div>}}<!--
-->{{#if:{{#var:tOLD}}|''This {{#var:tNAME}} is currently considered [[:Category:{{#var:tCATEGORY}}|old]]. Content is retained for reference or subsequent updates.''}}<!--
--><div style="clear:left;"></div><!--
    SUBPAGE BREADCRUMB  this could be automatic
-->{{#if:{{#var:tSUBPAGE}}|<!--
  -->{{#if:{{{2|}}}|<small>[[{{{2|}}}]] &raquo; {{{3|}}}</small>}}<!--
-->}}<!--
--><includeonly>{{#if:{{{doc|}}}|<!-- stuff below should only appear if doc=something not set
  -->|{{#ifeq:{{#var:tNAME}}|{{PAGENAME}}|<!--
    -->|[[Category:{{#var:tCATEGORY}}|{{#if:{{{1|}}}|{{{1|}}}|{{PAGENAME}}}}]]<!--  let 'hosted' be in regular list as well
    -->{{#if:{{#var:tOLD}}|<!--
      -->|{{#if:{{#var:tHOSTED}}<!--
        -->|[[Category:{{#var:tHOSTED}} {{#var:tCATEGORY}}|{{#if:{{{1|}}}|{{{1|}}}|{{PAGENAME}}}}]]<!--
      -->}}<!--
    -->}}<!--
    -->{{#if:{{{lib|{{{library|}}}}}}<!--
      -->|[[Category:{{#var:tNAMES}} Libraries {{#if:{{#var:tSUBPAGE}}|Subpages}}|{{#if:{{{1|}}}|{{{1|}}}|{{PAGENAME}}}}]]<!--
    -->}}<!--
  -->}}<!--
-->}}</includeonly><!--
--></onlyinclude>

Latest revision as of 06:18, 16 May 2020

Adds a banner and puts the page in Category:AddOns or Category:Hosted AddOns. See also {{Infobox addon}}. Use {{addoninfo}} for regular wiki pages. Use {{Uiaddon}} for technical or development AddOn pages.

Changing this page will affect AddOns, AddOn Libraries, and Tools.

Usage
1= (Optional) override the usual banner title
name= thing to call this, if not an 'AddOn'
old= (Optional) set to '1' to mark as abandoned or no longer working in current versions WoW
hosted= (Optional) set to '0' to mark as not 'hosted'
subpage= (Optional) set to '1' to mark as 'subpage'
banner= (Optional) set to '0' to disable the 'cog' banner. normally should have banner for disambiguation
library=|lib= (Optional) set to '1' to mark as AddOn library or 'lib'.

Template
AddOn
WoWWiki Hosted AddOn Page