Changes for page View File Macro
Summary
Details
- Page properties
-
- Content
-
... ... @@ -6,14 +6,15 @@ 6 6 7 7 |=Parameter|=Description|=Required|=Default 8 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| 9 +|name|The attachment reference to display|if att--filename is not given| 10 10 |page|The page from where you want the attachments to be displayed. Modifying this parameter will reset the selected file value|no| 11 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 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| 13 +|att--filename|Alias of name|If name is not given| 14 14 15 15 = Example Usage = 16 16 17 + 17 17 Thumbnails side by side: 18 18 19 19 {{view-file display="thumbnail" name="Test.ppt"/}} {{view-file display="thumbnail" name="TestPDF.pdf"/}} ... ... @@ -32,4 +32,3 @@ 32 32 Full Presentation: 33 33 34 34 {{view-file display="full" name="Test.ppt"/}} 35 -
- XWiki.WikiMacroClass[0]
-
- Macro code
-
... ... @@ -1,0 +1,10 @@ 1 +{{velocity}} 2 +#set ($name = $xcontext.macro.params.name) 3 +#set ($page = $xcontext.macro.params.page) 4 +#set ($display = $xcontext.macro.params.display) 5 +#set ($width = $xcontext.macro.params.width) 6 +#set ($height = $xcontext.macro.params.height) 7 + 8 +#viewFile($name $page $display $width $height) 9 +{{/velocity}} 10 + - Macro visibility
-
... ... @@ -1,0 +1,1 @@ 1 +Current Wiki - Cached
-
... ... @@ -1,0 +1,1 @@ 1 +No - Supports inline mode
-
... ... @@ -1,0 +1,1 @@ 1 +Yes - Macro description
-
... ... @@ -1,0 +1,2 @@ 1 +Displays a file viewer for attachments (PDF, images, etc). 2 + - Asynchronous rendering
-
... ... @@ -1,0 +1,1 @@ 1 +No - Default categories
-
... ... @@ -1,0 +1,1 @@ 1 +Content - Macro name
-
... ... @@ -1,0 +1,1 @@ 1 +view-file - Macro id
-
... ... @@ -1,0 +1,1 @@ 1 +view-file
- XWiki.WikiMacroParameterClass[0]
-
- Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +name - Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +The exact name of the attachment (e.g. myfile.pdf) - Parameter type
-
... ... @@ -1,0 +1,1 @@ 1 +unknown - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +Yes
- XWiki.WikiMacroParameterClass[1]
-
- Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +page - Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +The page that holds the attachment (e.g. Studies.MyFilePage) - Parameter type
-
... ... @@ -1,0 +1,1 @@ 1 +unknown - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No
- XWiki.WikiMacroParameterClass[2]
-
- Parameter default value
-
... ... @@ -1,0 +1,1 @@ 1 +thumbnail (button in inline mode) - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +display - Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +Values below ⬇️ - Parameter type
-
... ... @@ -1,0 +1,1 @@ 1 +unknown - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No
- XWiki.WikiMacroParameterClass[3]
-
- Parameter default value
-
... ... @@ -1,0 +1,1 @@ 1 +100% for the full view or 100px for the thumbnail - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +width - Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +Examples: 100%, 600px - Parameter type
-
... ... @@ -1,0 +1,1 @@ 1 +unknown - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No
- XWiki.WikiMacroParameterClass[4]
-
- Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +height - Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +Examples: 100%, 600px - Parameter type
-
... ... @@ -1,0 +1,1 @@ 1 +unknown - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No
- XWiki.WikiMacroParameterClass[5]
-
- Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +alt - Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +Alias for attachment name (used for display titles) - Parameter type
-
... ... @@ -1,0 +1,1 @@ 1 +unknown - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No