Zip Explorer Plugin

The Zip Explorer Plugin provides an API to create links to files inside a ZIP file. The plugin is enabled by default in XWiki Standard, so you will find it in the "xwiki.plugins" list of the xwiki.cfg file:


The source code is available on GitHub at xwiki-platform-zipexplorer

The Zip Explorer API lists the content of ZIP attachments (including XAR files) and listens to the XWiki download action in order to display the attachment content. The accepted URLs have the following syntax:



Supposing you have an attachment named "xwiki-commons-component-api-6.1-javadoc.jar" which contains a Javadoc and you want to create a link to the "index.html" file, the "xwiki/2.1" syntax will be:

[[XWiki Commons - Component - API 6.1 API Javadoc>>path:$xwiki.zipexplorer.getFileLink($doc,
"xwiki-commons-component-api-6.1-javadoc.jar", "index.html")]]

To list the content of the "xwiki-enterprise-ui-mainwiki-all-6.0.xar" file attached to the current page, use the snippet below:

#foreach($file in $plugin.getFileTreeList($doc, $myXAR))
 * [[$>>path:$plugin.getFileLink($doc, $myXAR, $]]

The output will then be:



Related Pages

Search this space


Most popular tags

Failed to execute the [groovy] macro
  1. access rights
  2. activity stream
  3. annotation
  4. attachment
  5. comment
  6. Document Tree Macro
  7. export
  8. Extension Manager
  9. Flamingo skin
  10. global user
  11. Groovy event listener
  12. group
  13. nested page
  14. search
  15. skin
  16. syntax
  17. user
  18. user profile
  19. velocity macros
  20. wiki
  21. wysiwyg
  22. XWiki Applications
  23. xwikiattachment_archive table
  24. xwikiattachment table
  25. xwikiattrecyclebin table
  26. xwikiproperties table

[Display all tags from this space]