0 Votes

Wiki source code of View File Macro

Last modified by Ryan C on 2025/04/30 07:54

Show last authors
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 |page|The page from where you want the attachments to be displayed. Modifying this parameter will reset the selected file value|no|
11 |width|The width of the view in % or px (e.g. 100%, 100px)|no|100% for the full view or 100px for the thumbnail
12 |height|The height of the view in % or px (e.g. 100%, 100px)|no|1000px for the full view or 100px for the thumbnail
13 |att--filename|Alias of name|If name is not given|
14
15 = Example Usage =
16
17
18 Thumbnails side by side:
19
20 {{view-file display="thumbnail" name="Test.ppt"/}} {{view-file display="thumbnail" name="TestPDF.pdf"/}}
21
22 Or standalone:
23
24 {{view-file name="Test.ppt"/}}
25
26 In a paragraph: {{view-file name="Test.ppt"/}}
27
28
29 Full PDF:
30
31 {{view-file display="full" name="TestPDF.pdf"/}}
32
33 Full Presentation:
34
35 {{view-file display="full" name="Test.ppt"/}}