Wiki source code of View File Macro
Last modified by Frank Fock on 2025/04/04 21:18
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
3.1 | 1 | The view-file macro displays attachments in a document, in place or as thumbnail and offers a preview. |
![]() |
1.1 | 2 | |
![]() |
3.1 | 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) | ||
![]() |
4.1 | 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| | ||
![]() |
3.1 | 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 | ||
![]() |
4.1 | 13 | |att--filename|Alias of name|If name is not given| |
![]() |
3.1 | 14 | |
15 | = Example Usage = | ||
16 | |||
17 | Thumbnails side by side: | ||
18 | |||
19 | {{view-file display="thumbnail" name="Test.ppt"/}} {{view-file display="thumbnail" name="TestPDF.pdf"/}} | ||
20 | |||
21 | Or standalone: | ||
22 | |||
23 | {{view-file name="Test.ppt"/}} | ||
24 | |||
25 | In a paragraph: {{view-file name="Test.ppt"/}} | ||
26 | |||
27 | |||
28 | Full PDF: | ||
29 | |||
30 | {{view-file display="full" name="TestPDF.pdf"/}} | ||
31 | |||
32 | Full Presentation: | ||
33 | |||
34 | {{view-file display="full" name="Test.ppt"/}} | ||
35 |