Folder ContentsΒΆ

*** 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

The Contents item on the Toolbar shows a list of items in a folder. It is the place for simple item-by-item actions and for bulk actions such as copy, cut, paste, move, reorder, etc.

The Contents tab for folders is like “File Manager” or “My Computer” system utilities in Windows and Linux desktops and the “Finder” in Mac OS X, with similar functionality.

folder contents

The general method is to select one or more items, by checking the checkbox in front of their name, and then performing the desired operation.

Shift-clicking to select a range of items works. This could be very handy for a folder with more than a dozen items or so, and would be indispensable for folders with hundreds of items.

Let’s go over the possibilities one by one:

columns

The first icon lets you select the columns to show. This can help you find the right content.

selected

The second item in the horizontal bar shows how many items you have selected.

rearrange Press “Rearrange” to sort all items in the folder, for instance alphabetically on their title, or chronologically by creation date, published date or date last modified.

Warning

Be careful when using this option, especially in the root of the site. As folders get re-arranged, it will change the order of the navigation tabs in your site.

upload

“Upload” allows you to upload one or more files (like images or PDF’s) from your computer.

cut - copy - paste

“Cut”, “Copy” and “Paste” do what you expect them to do.

delete

The “Delete” button has a red color, since this is a potentially dangerous operation.

rename

Rename will open up a form where you can change the Title and the short name for an item. The Title can be anything you like, but the short name is part of the URL. That means you have to abide by certain rules:
  • it cannot contain any spaces or special characters like * or \. When you create an item, Plone generates a safe short name from the Title, but when you change this later you should take care this remains a valid URL.
  • it has to be unique in a folder. You can have two items with the same Title (although it would be confusing), but you cannot have two items with the same short name within the same folder. It’s perfectly fine to have the same short name being used in different folders.

tags

Tags allows you to set tags on several items in bulk. This can be a real time-saver.

state

State will allow you to change the workflow state of one or more items, such as publishing them. See the chapter on collaboration and workflow for in-depth information.

properties

With the Properties button you can set things like the Publication Date, Expiration Date, copyright and other metadata on your content items.

searchbox

And finally, use the Query searchbox to locate content items, if you know (part of) the title or any other identifier. This is a very quick way to get to content items in folders with hundreds or thousands of items.