Template:FigImage: Difference between revisions
From Electrical Installation Guide
m (Protected "Template:FigImage" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
(test) |
||
Line 1: | Line 1: | ||
<includeonly>< | <includeonly>{{#if: {{#var:img_id}} |<!-- | ||
-->{{#vardefine:img_id|{{{1|{{{id|}}}}}} }}<!-- | |||
-->{{#vardefine:img_ext|{{{2|{{{ext|}}}}}} }}<!-- | |||
-->{{#vardefine:lang_ext|_EN}}<!-- | |||
-->{{#vardefine:pos_lang|{{#rpos:{{#var:img_id}}|{{#var:lang_ext}} }} }}<!-- | |||
-->{{#vardefine:len_m_3|{{#expr: {{#len:{{#var:img_id}}}} - 3}}}}<!-- | |||
-->{{#vardefine:img_id|{{#ifeq:{{#var:pos_lang}} | {{#var:len_m_3}} | {{#replace:{{#var:img_id}}|_EN|}} | {{#var:img_id}}}}}}<!-- | |||
-->{{#vardefine:file_name|{{#ifexist:File:{{#var:img_id}}{{#var:lang_ext}}.{{#var:img_ext}} | {{#var:img_id}}{{#var:lang_ext}}.{{#var:img_ext}} | {{#var:img_id}}.{{#var:img_ext}}}} }}<!-- | |||
--><div id="{{#var:img_id}}" class="img_anchor">[[File:{{#var:file_name}}|frame|none|{{FigNotes|{{{5|{{{notes|}}}}}}}}{{FigTitle|{{{3|{{{num|}}}}}}|{{{4|{{{title|}}}}}}}}]]</div>[[has_figure_id::{{#var:img_id}}| ]] }}</includeonly><noinclude> | |||
[[Category:eig-image-templates|{{PAGENAME}}]] | [[Category:eig-image-templates|{{PAGENAME}}]] |
Revision as of 12:38, 26 August 2021
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
Parameter | Description | Type | Status | |
---|---|---|---|---|
ID | 1 id | image "id" (file name without the file extension)
| String | required |
Extension | 2 ext | image file extension (without the .)
| String | required |
Number | 3 num | Figure number
| String | required |
Title | 4 title | Figure title
| String | required |
Figure Notes | 5 notes | will be added after the figure, with special class and special formatting | Unbalanced wikitext | optional |
Optional | 6 | no description
| Unbalanced wikitext | optional |