Wiki-Quellcode von View File Macro

Zuletzt geändert von xwikiadmin am 2025/01/07 12:27

Zeige letzte Bearbeiter
1 The view-file macro displays attachments in a document, in place or as thumbnail and offers a preview.
2
3 Limitation: the thumbnail is actually only an icon for now.
4
5 = Parameters =
6
7 |=Parameter|=Description|=Required|=Default
8 |display|Kind of display. "button" for a button, "thumbnail" for a thumbnail, "full" to render the document in place|no|thumbnail (button in inline mode)
9 |name|The attachment reference to display|if att-filename is not given|
10 |width|The width of the view in % or px (e.g. 100%, 100px)|no|100% for the full view or 100px for the thumbnail
11 |height|The height of the view in % or px (e.g. 100%, 100px)|no|1000px for the full view or 100px for the thumbnail
12 |att-filename|Alias of name|If name is not given|
13
14 = Example Usage =
15
16 Thumbnails side by side:
17
18 {{view-file display="thumbnail" name="Test.ppt"/}} {{view-file display="thumbnail" name="TestPDF.pdf"/}}
19
20 Or standalone:
21
22 {{view-file name="Test.ppt"/}}
23
24 In a paragraph: {{view-file name="Test.ppt"/}}
25
26
27 Full PDF:
28
29 {{view-file display="full" name="TestPDF.pdf"/}}
30
31 Full Presentation:
32
33 {{view-file display="full" name="Test.ppt"/}}