Template:Pattern Graphic: Difference between revisions
Jump to navigation
Jump to search
(missing brackets) |
(smaller legend) |
||
Line 3: | Line 3: | ||
<br>{{#vardefine:title|{{#if:{{{title|}}}|{{{title}}}|{{#var:kind}} Pattern {{#var:friendlyname}}}} }} | <br>{{#vardefine:title|{{#if:{{{title|}}}|{{{title}}}|{{#var:kind}} Pattern {{#var:friendlyname}}}} }} | ||
[[File:{{{graphic|No graphic yet.png}}}|none|{{#if:{{{size|}}}|{{{size}}}{{!}}}}{{#if:{{{title|}}}|{{{title}}}|{{#var:title}}}}]] | [[File:{{{graphic|No graphic yet.png}}}|none|{{#if:{{{size|}}}|{{{size}}}{{!}}}}{{#if:{{{title|}}}|{{{title}}}|{{#var:title}}}}]] | ||
<br>{{#ifeq:{{#var:kind}}|Applied|[[File:Framed Applied Pattern legend.png|left]]|[[File:Framed Generic Pattern legend.png|left]]}}{{#ifexist: File:{{{source|}}} |<small>(The [[:File:{{{source}}}|source file]] of this image can be downloaded [[Media:{{{source}}}|here]]).</small><br>}}{{clear}} | <br>{{#ifeq:{{#var:kind}}|Applied|[[File:Framed Applied Pattern legend.png|left]]|[[File:Framed Generic Pattern legend.png|left|311px]]}}{{#ifexist: File:{{{source|}}} |<small>(The [[:File:{{{source}}}|source file]] of this image can be downloaded [[Media:{{{source}}}|here]]).</small><br>}}{{clear}} | ||
<noinclude> | <noinclude> | ||
|} | |} |
Revision as of 21:26, 16 April 2013
Functional and Integration view
This is the graphic representation of the functional model of this Generic Pattern:
|}
This template is used on both Generic Pattern and Applied Pattern pages; it displays the "functional and integration view" of the Pattern, if that image is uploaded to the wiki, complete with a matching legend. Furthermore, if the source file from which the image is created is also uploaded to the wiki, then this file can be indicated as well, and a download link to that file will be provided to the reader right next to the legend.
The template takes the following parameters:
- graphic: an uploaded image file that depicts the functional & integration view of the pattern. If this is left blank, the No graphic yet image is used instead.
- source: an uploaded file (likely a .vsd Visio file), which is the source of the uploaded image. This parameter is optional.
- size: a wikitext parameter for the "Image" command, such as "400px" (width only) or "200x400px" (width by height). If left empty, the wiki will attempt to show the graphic in its original size.
- title: the "alternative" text, i.e. the text that is shown when the cursor hovers over the picture. If left empty, a name is generated: "Generic Pattern" (or "Applied Pattern") plus the Pattern's "friendly name". This usually suffices, so you only use title if you need to override this generated alternative text.
- kind: specify whether the graphic is a Generic Pattern or an Applied Pattern by using either Generic or Applied. If misspelled or left empty, Generic is assumed.
To use the template, cut and paste the following code:
{{Pattern Graphic |graphic= |source= |size= |title= |kind= }}
The above documentation is transcluded from Template:Pattern Graphic/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |