Deleting ItemsΒΆ
*** Settings ***
Resource plone/app/robotframework/server.robot
Resource plone/app/robotframework/keywords.robot
Resource Selenium2Screenshots/keywords.robot
Library OperatingSystem
Suite Setup Run keywords Suite Setup Test Setup
Suite Teardown Run keywords Test teardown Suite Teardown
*** Variables ***
${FIXTURE} plone.app.robotframework.PLONE_ROBOT_TESTING
@{DIMENSIONS} 1024 768
@{APPLY_PROFILES} plone.app.contenttypes:plone-content
*** Keywords ***
Suite Setup
Run keyword if not sys.argv[0].startswith('bin/robot')
... Setup Plone site ${FIXTURE}
Run keyword if sys.argv[0].startswith('bin/robot')
... Open test browser
Run keyword and ignore error Set window size @{DIMENSIONS}
Test Setup
Import library Remote ${PLONE_URL}/RobotRemote
Run keyword if sys.argv[0].startswith('bin/robot')
... Remote ZODB SetUp ${FIXTURE}
${language} = Get environment variable LANGUAGE 'en'
Set default language ${language}
Enable autologin as Manager
${user_id} = Translate user_id
... default=jane-doe
${user_fullname} = Translate user_fullname
... default=Jane Doe
Create user ${user_id} Member fullname=${user_fullname}
Set autologin username ${user_id}
Test Teardown
Run keyword if sys.argv[0].startswith('bin/robot')
... Remote ZODB TearDown ${FIXTURE}
Suite Teardown
Run keyword if not sys.argv[0].startswith('bin/robot')
... Teardown Plone Site
Run keyword if sys.argv[0].startswith('bin/robot')
... Close all browsers
Items may be deleted from a folder with ease.
Sometimes it is necessary to delete a content item. Again, the easiest way to do this is by using “Contents” on the Toolbar.
Simply select the content item(s) you want to delete, and press the “Delete” button.
Entire folders may be deleted, so care must be taken with the delete operation!
Plone will warn you if there are other content items in your site that link to the one you are deleting, and will offer to open those in a separate window so you can edit them.
Note
Plone’s database will keep a record of deleted items, and in many cases your site administrator will be able to undo an accidental delete. However, this will only work if there haven’t been many site edits after the delete operation, so if you accidentally delete content, it is important to act soon. Careful site administrators will also have regular backups of the entire site, but getting your content back from there will involve more work. An alternative to deleting content is to ‘un-publish’ it, so it isn’t available to outside visitors anymore.