Wiki source code of Image Macro (Radeox)
Last modified by Thomas Mortagne on 2023/10/10 14:26
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | Adds an image to the page. | ||
2 | |||
3 | {{info}} | ||
4 | This Radeox Macro has been deprecated and in XWiki Syntax 2.0 the [[image syntax>>xwiki:Documentation.UserGuide.Features.XWikiSyntax]] should be used instead. | ||
5 | {{/info}} | ||
6 | |||
7 | The image must be added as an attachment. The location/page of the image is configurable (by //document// and //fromIncludingDoc//). Can also make the image to link to the image file. | ||
8 | |||
9 | == Usage == | ||
10 | |||
11 | {{code language="none"}} | ||
12 | {image:<image>|height=<height>|width=<width>|align=<align>|halign=<halign>|document=<document>|alt=<alt>|link=|fromIncludingDoc=} | ||
13 | {{/code}} | ||
14 | |||
15 | === Parameters definition === | ||
16 | |||
17 | |=Name|=Optional|=Allowed values|=Default values|=Description | ||
18 | |image|required|any image attachment name or an absolute URL to the image| |Name of the image attachment file. An absolute URL, starting with ##http:~/~/##, may also be used. | ||
19 | |height|yes|pixels or %|100%|Image height | ||
20 | |width|yes|pixels or %|100%|Image width | ||
21 | |align|yes|top, bottom, middle, left, right| |Alignment of image | ||
22 | |halign|yes|floatleft, floatright, left, center, right| |Alignment of image (using style sheet) | ||
23 | |document (*)|yes|document name within the wiki|current document|Document that contains the image attachment | ||
24 | |alt|yes|text| |Short image description | ||
25 | |link|yes|**Empty**(just end with =)| |Turns the image into a download link for the image | ||
26 | |fromIncludingDoc (*)|yes|**Empty**(just end with =)| |Fetch the image from the parent document that included the current document. This is useful for templates, for example. | ||
27 | |||
28 | (*) Use either //document// or //fromIncludingDoc//. Parameter //fromIncludingDoc// is ignored if both are specified. | ||
29 | |||
30 | == Example == | ||
31 | |||
32 | {{code language="none"}} | ||
33 | {image:gamesigns.jpg|height=128|width=128} | ||
34 | |||
35 | {image:gamesigns.jpg|height=256|width=128|halign=floatleft} This is a really nice picture. | ||
36 | |||
37 | {image:gamesigns.jpg|height=10%|width=10%|alt=Street Corner|link=} | ||
38 | |||
39 | {image:gamesigns.jpg|height=10%|width=10%|alt=Street Corner|link=} | ||
40 | |||
41 | {image:xwikisas.png|document=Main.Supporters} This image comes from Main.Supporters document | ||
42 | {{/code}} | ||
43 | |||
44 | === Result === | ||
45 | |||
46 | {{image reference=imagemacro.png/}} |