Template:FigImage: Difference between revisions

From Electrical Installation Guide
(removed change of line between <span> element and image)
No edit summary
Line 1: Line 1:
<includeonly><span id="{{{1}}}" class="img_anchor"></span>[[File:{{{1|}}}.{{{2|}}}|frame|none|{{FigNotes|{{{5|}}}}}{{FigTitle|{{{3|}}}|{{{4|}}}}}{{#if: {{{6|}}}|{{!}}{{{6}}}|}}{{#if: {{{7|}}}|{{!}}{{{7}}}|}}]]</includeonly><noinclude>
<includeonly><div id="{{{1|{{{id|}}}}}}" class="img_anchor">[[File:{{{1|{{{id|}}}}}}.{{{2|{{{ext|}}}}}}|frame|none|{{FigNotes|{{{5|{{{notes|}}}}}}}}{{FigTitle|{{{3|{{{num|}}}}}}|{{{4|{{{title|}}}}}}}}]]</div>{{#if: {{{1|{{{id|}}}}}} |[[has_figure_id::{{{1|{{{id|}}}}}}| ]]}}</includeonly><noinclude>


[[Category:Utility templates|{{PAGENAME}}]]
[[Category:eig-image-templates|{{PAGENAME}}]]
 
 
== Description ==
 
This template is used to integrate a vectorial or bitmap image in a wiki page, when this image/photo corresponds to a Figure (result = the image will be integrated in a "frame")
 
Syntax:
 
<nowiki>{{ FigImage | <1=fig-ID> | <2=fig-extension> | <3=fig-num> | <4=fig-title> | <5=fig-notes> | <optional other parameters> }}</nowiki>
 
Where:
<fig-ID>        is like:  DB422001  (= image file name, without the file extension)
<fig-extension>  is like:  svg, jpg ...
<fig-title>      is like:  Application of the diversity factor (ks) to an apartment block of 5 storeys
<fig-num>        is like:  A11, B42a ...
<fig-notes>      will be added after the figure, with special class and special formatting
<optional other parameters>  can be like "600px" ...
 
* in this version,  <fig-num>  (like '''A11''') HAS TO BE PROVIDED
 
* Nota:
<fig-title> normally should not include any formatting, unless it is required, like to add a link inside the title
 
title example:  Circuit-breaker type <nowiki>'''[http://www.xxxxxxx Masterpact]'''</nowiki> from Schneider-Electric


<templatedata>
{
"params": {
"1": {
"label": "ID",
"description": "image \"id\" (file name without the file extension)",
"example": "DB422001",
"type": "string",
"required": true,
"aliases": [
"id"
]
},
"2": {
"label": "Extension",
"description": "image file extension (without the .)",
"example": "svg, jpg ...",
"type": "string",
"required": true,
"aliases": [
"ext"
]
},
"3": {
"label": "Number",
"description": "Figure number",
"example": "A11, B42a ...",
"type": "string",
"required": true,
"aliases": [
"num"
]
},
"4": {
"label": "Title",
"description": "Figure title",
"example": "Application of the diversity factor (ks) to an apartment block of 5 storeys",
"type": "string",
"required": true,
"aliases": [
"title"
]
},
"5": {
"label": "Figure Notes",
"description": "will be added after the figure, with special class and special formatting",
"type": "unbalanced-wikitext",
"aliases": [
"notes"
]
},
"6": {
"label": "Optional",
"example": "can be like \"600px\"",
"type": "unbalanced-wikitext"
}
},
"description": "This template is used to integrate a vectorial or bitmap image in a wiki page, as a Figure, eg image in a frame + fignum + title + (optionally) some figure notes"
}
</templatedata>
</noinclude>
</noinclude>

Revision as of 08:31, 20 December 2019


This template is used to integrate a vectorial or bitmap image in a wiki page, as a Figure, eg image in a frame + fignum + title + (optionally) some figure notes

Template parameters

ParameterDescriptionTypeStatus
ID1 id

image "id" (file name without the file extension)

Example
DB422001
Stringrequired
Extension2 ext

image file extension (without the .)

Example
svg, jpg ...
Stringrequired
Number3 num

Figure number

Example
A11, B42a ...
Stringrequired
Title4 title

Figure title

Example
Application of the diversity factor (ks) to an apartment block of 5 storeys
Stringrequired
Figure Notes5 notes

will be added after the figure, with special class and special formatting

Unbalanced wikitextoptional
Optional6

no description

Example
can be like "600px"
Unbalanced wikitextoptional