0 Votes

Changes for page View File Macro

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

From version 1.1
edited by Ryan C
on 2025/03/06 16:46
Change comment: Install extension [com.xwiki.pro:xwiki-pro-macros-ui/1.26.4]
To version 3.1
edited by Ryan C
on 2025/04/15 20:09
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -6,11 +6,11 @@
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  
XWiki.WikiMacroClass[0]
Cached
... ... @@ -1,0 +1,1 @@
1 +No
Asynchronous rendering
... ... @@ -1,0 +1,1 @@
1 +No
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 +
Default categories
... ... @@ -1,0 +1,1 @@
1 +Content
Macro description
... ... @@ -1,0 +1,2 @@
1 +Displays a file viewer for attachments (PDF, images, etc).
2 +
Macro id
... ... @@ -1,0 +1,1 @@
1 +view-file
Macro name
... ... @@ -1,0 +1,1 @@
1 +view-file
Supports inline mode
... ... @@ -1,0 +1,1 @@
1 +Yes
Macro visibility
... ... @@ -1,0 +1,1 @@
1 +Current Wiki
XWiki.WikiMacroParameterClass[0]
Parameter description
... ... @@ -1,0 +1,1 @@
1 +The exact name of the attachment (e.g. myfile.pdf)
Parameter mandatory
... ... @@ -1,0 +1,1 @@
1 +Yes
Parameter name
... ... @@ -1,0 +1,1 @@
1 +name
Parameter type
... ... @@ -1,0 +1,1 @@
1 +string
XWiki.WikiMacroParameterClass[1]
Parameter description
... ... @@ -1,0 +1,1 @@
1 +The page that holds the attachment (e.g. Studies.MyFilePage)
Parameter mandatory
... ... @@ -1,0 +1,1 @@
1 +Yes
Parameter name
... ... @@ -1,0 +1,1 @@
1 +page
Parameter type
... ... @@ -1,0 +1,1 @@
1 +string
XWiki.WikiMacroParameterClass[2]
Parameter description
... ... @@ -1,0 +1,1 @@
1 +Values below ⬇️
Parameter mandatory
... ... @@ -1,0 +1,1 @@
1 +No
Parameter name
... ... @@ -1,0 +1,1 @@
1 +display
Parameter type
... ... @@ -1,0 +1,1 @@
1 +staticlist
XWiki.WikiMacroParameterClass[3]
Parameter description
... ... @@ -1,0 +1,1 @@
1 +Examples: 100%, 600px
Parameter mandatory
... ... @@ -1,0 +1,1 @@
1 +No
Parameter name
... ... @@ -1,0 +1,1 @@
1 +width
Parameter type
... ... @@ -1,0 +1,1 @@
1 +string
XWiki.WikiMacroParameterClass[4]
Parameter description
... ... @@ -1,0 +1,1 @@
1 +Examples: 100%, 600px
Parameter mandatory
... ... @@ -1,0 +1,1 @@
1 +No
Parameter name
... ... @@ -1,0 +1,1 @@
1 +height
Parameter type
... ... @@ -1,0 +1,1 @@
1 +string
XWiki.WikiMacroParameterClass[5]
Parameter description
... ... @@ -1,0 +1,1 @@
1 +Alias for attachment name (used for display titles)
Parameter mandatory
... ... @@ -1,0 +1,1 @@
1 +No
Parameter name
... ... @@ -1,0 +1,1 @@
1 +alt
Parameter type
... ... @@ -1,0 +1,1 @@
1 +string

XWiki AI Chat