Template:ToolInfoBox: Difference between revisions

From CoMakingSpace Wiki

(changed example to match new tool definition (scroll saw now a "machine"))
(added "extrabox" & HasImage functionality for use with semantic image queries)
Line 58: Line 58:


There are a few tool categories such as [[woodworking]] or [[saws]] - please also [[Help:Wiki Basics#Categories & Namespaces|categorize]] your page to make it easier to find!
There are a few tool categories such as [[woodworking]] or [[saws]] - please also [[Help:Wiki Basics#Categories & Namespaces|categorize]] your page to make it easier to find!
== Advanced Users (SMW) ==
There is a "hidden" parameter in this template that's not in the copy template: <code>extrabox</code>. To enable <code>extrabox</code>, just give it any value (e.g. "true", "blablabla") and it should cause the box to behave as an extra without "Has image::".
You can use it when you '''don't''' want the InfoBox to set a "Has image::" value (as it automatically does for "image"). That's useful on pretty much every page with multiple InfoBoxes so there is just one "main" image to represent the page in galleries.
Questions, feedback and further improvements are welcome!


</noinclude>
</noinclude>
Line 66: Line 73:
<big>'''{{{tool name|Unnamed Tool}}}'''</big>
<big>'''{{{tool name|Unnamed Tool}}}'''</big>
|-
|-
!colspan="2"| [[File:{{#if: {{{image|}}} | {{{image}}} |tool-default.png}}|frameless|300px]]
!colspan="2"| [[{{#if: {{{extrabox|}}} |File: | Has image::File:}}{{#if: {{{image|}}} |{{{image}}} |tool-default.png}}|frameless|300px]]
|-
|-
{{#if: {{{synonyms|}}} |
{{#if: {{{synonyms|}}} |
Line 135: Line 142:
|}
|}
[[Category:Tools]]
[[Category:Tools]]
[[Has caption::{{#if: {{{extrabox|}}} | |{{PAGENAME}}}}| ]]
[[Has redirect::{{#if: {{{extrabox|}}} | |{{PAGENAME}}}}| ]]

Revision as of 23:20, 1 March 2021


ToolInfoBox

Example: Woodturning Tools

Cheap woodturning tools.JPG
Synonyms: DE: Drechseleisen, Drechselmesser
Material: wood
Used with: wood lathe
Location: wood workshop
(wall above wood lathe)
Access Requirements: woodturning introduction
Tutors: Lukas


Pretty much everything that does not qualify as a machine/power tool and is (usually) not a consumable material is called a "tool" in this wiki and should get its own page eventually. Dangerous or complicated tools first, of course!

Documentation

To use this template, simply copy this code into your page and enter the relevant parameters:

{{ToolInfoBox
|tool name=
|image=
|synonyms=
|type=
|status=
|material=
|used with=
|location=
|access=
|tutors=
|manual=
|donation=
|similar=
}}

Most fields will only be shown when they are actually used, i.e. you can easily create more or less detailed boxes (at least name and image). Make frequent use of the "Show preview" button and it should be clear.

For example, entering the following leads to the box on the right:

{{ToolInfoBox
|tool name=Example: Woodturning Tools
|image=cheap woodturning tools.JPG
|synonyms=DE: Drechseleisen, Drechselmesser
|type=
|status=
|material=[[wood]]
|used with=[[Wood Lathe|wood lathe]]
|location=[[Wood Workshop|wood workshop]]<br>(wall above wood lathe)
|access=[[Woodturning Introduction|woodturning introduction]]
|tutors=[[Lukas]]
|manual=
|donation=
|similar=
}}

There are a few tool categories such as woodworking or saws - please also categorize your page to make it easier to find!

Advanced Users (SMW)

There is a "hidden" parameter in this template that's not in the copy template: extrabox. To enable extrabox, just give it any value (e.g. "true", "blablabla") and it should cause the box to behave as an extra without "Has image::".

You can use it when you don't want the InfoBox to set a "Has image::" value (as it automatically does for "image"). That's useful on pretty much every page with multiple InfoBoxes so there is just one "main" image to represent the page in galleries.

Questions, feedback and further improvements are welcome!



ToolInfoBox

Unnamed Tool

Tool-default.png