Difference between revisions of "Template:To-do Icon"

From Nookipedia, the Animal Crossing wiki
m (Template will now also count subcategories by default.)
(Simplifying code. Allowing for up to three category pages to be added together.)
Line 1: Line 1:
 
<div style="float:left; text-align:center;">
 
<div style="float:left; text-align:center;">
[[File:{{{image|Corkboard}}} HHD Icon.png|link={{{altlink|{{{link|Category:Active discussions}}}}}}|{{{hover|Active discussions}}}]]<br><small>{{{text|Topics}}}</small><br>[[{{{altlink|:{{{link|Category:Active Discussions}}}}}}|{{colorshow|000|{{#if:{{{link2|}}}|{{#expr:{{PAGESINCATEGORY:{{#titleparts: {{PAGENAME:{{{link|Category:Active Discussions}}}}}}}|all|R}}+{{PAGESINCATEGORY:{{#titleparts: {{PAGENAME:{{{link2|Category:Active Discussions}}}}}}}|all|R}}}}|{{PAGESINCATEGORY:{{#titleparts: {{PAGENAME:{{{link|Category:Active Discussions}}}}}}}|all|R}}}}}}]]
+
[[File:{{{image|Corkboard}}} HHD Icon.png|link={{{altlink|{{{link|Category:Active discussions}}}}}}|{{{hover|Active discussions}}}]]<br><small>{{{text|Topics}}}</small><br>[[{{{altlink|:{{{link|Category:Active Discussions}}}}}}|{{colorshow|000|{{#expr:{{PAGESINCATEGORY:{{#titleparts: {{PAGENAME:{{{link|Category:Active Discussions}}}}}}}|pages|R}}+{{PAGESINCATEGORY:{{#titleparts: {{PAGENAME:{{{link2|}}}}}}}|pages|R}}+{{PAGESINCATEGORY:{{#titleparts: {{PAGENAME:{{{link3|}}}}}}}|pages|R}}}}}}]]
 
</div>
 
</div>
 
<noinclude>
 
<noinclude>
Line 18: Line 18:
 
*Template will only produce {{HHD}} furniture icons, so only HHD items should be input.
 
*Template will only produce {{HHD}} furniture icons, so only HHD items should be input.
 
*Template can only properly link to category pages.
 
*Template can only properly link to category pages.
*The parameter '''link2''' can be used to add a second category's page count to the number displayed below the icon.
+
*The parameter '''link2''' and '''link3''' can be used to add a second and third category's page count, respectively, to the number displayed below the icon.
 
*The parameter '''altlink''' can be used to link to a page other than the category page being counted.
 
*The parameter '''altlink''' can be used to link to a page other than the category page being counted.

Revision as of 02:06, November 5, 2019

Active discussions
Topics
0

Usage

This icon is used as a visual representation of different types of active to-do tasks on Nookipedia.

{{To-do Icon
| image  = (Name of item to display)
| link  = (Page to link to)
| hover = (Hover text)
| text  = (Text to display)
}}

Notes

  • Template will only produce Animal Crossing: Happy Home Designer furniture icons, so only HHD items should be input.
  • Template can only properly link to category pages.
  • The parameter link2 and link3 can be used to add a second and third category's page count, respectively, to the number displayed below the icon.
  • The parameter altlink can be used to link to a page other than the category page being counted.