The Recycle Bin is temporary storage where assets go when you delete them. You can recycle several different types of assets:
- Documents and Media
- Message Boards (and attachments)
- Web Content
- Wiki (and attachments)
To demonstrate using the Recycle Bin let’s delete a web content article and then restore it. You’ll run through two different methods of restoring the file.
Go to Site Administration and select Content & Data → Web Content.
Select the Add button () and click Basic Web Content.
Enter some text for the Title and Content and click Publish.
Click the article’s Actions button () and click Move to the Recycle Bin.
Note that the Delete button is not listed. Liferay DXP avoids the risk of accidental deletion of your files by funneling the content through the Recycle Bin.
After deleting the file, a success message appears, offering an Undo option. Click Undo. The web content is retrieved from the Recycle Bin and stored in its original place.
Click Move to the Recycle Bin again.
Go back to Site Administration and click Recycle Bin from the Content dropdown.
Find your sample web content and click its Actions button.
You can restore or delete the content. Select Restore.
Navigate back to the Web Content screen and notice that your sample web content is back to its original place.
That covers the two general processes of sending and restoring content to/from the Recycle Bin. For other asset types, the Recycle Bin works similarly.
Some applications, such as Web Content and Documents and Media, support folders for organizing content. You can also send folders to the Recycle Bin. Keep in mind that this sends any sub-folders of the deleted folder all the files it contains to the Recycle Bin. Folders are restored and deleted the same way as a single file.
Delete within the Recycle Bin is the permanent delete button. Once you select this, your file cannot be retrieved and is gone forever. There is also an Empty the Recycle Bin option accessible from the () button at the top of the Recycle Bin screen. This permanently deletes all the files from the Recycle Bin.
You can also drag and drop items into the Recycle Bin. While you’re in the Control Panel, select an asset and drag it to the Recycle Bin portlet on the Control Panel menu. When you click and begin dragging the asset, a message appears near your cursor notifying you of the number of files ready to be moved, and the Recycle Bin is highlighted, showing you where the files can be dropped. After you drop the asset onto the Recycle Bin portlet, the asset is removed from its original location and transferred to the Recycle Bin.
Awesome! You now know how to use the Recycle Bin!