Deleted Documents

Last modified by Vincent Massol on 2021/03/18 11:28

cogLists all the documents that have been deleted on your wiki and are stored in the wiki's recycle bin
TypeSnippet
Category
Developed by

Guillaume Lerouge

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Table of contents

Description

You can click on a document name to go to its initial page and restore it.

This snippet requires the page to be saved with programming rights in order to work.

{{velocity}}
## Note that we need to use the HTML macro here since we cannot use
## [[$item>>$xwiki.getURL($item)]] since it produces a relative URL
## that won't work. In the future we plan to introduce a solution for this
## see http://jira.xwiki.org/jira/browse/XWIKI-3611 for more information.
{{html}}
<ul>
#foreach($item in $xwiki.search("select distinct ddoc.fullName from XWikiDeletedDocument as ddoc where ddoc.fullName not in (select doc.fullName from XWikiDocument as doc) order by 1 asc"))
<li><a href="$xwiki.getURL($item)">$item</a></li>
#end
</ul>
{{/html}}
{{/velocity}}
     

Get Connected