Inserting TablesΒΆ

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

Tables are handy for tabular data and lists.

To add a table, put your cursor where you want it and click the Table dropdown menu.

TinyMCE table

There are various options to choose a style for the table, insert rows and columns, and set properties on the individual cells. Plone comes with a few basic styles for tables, but you (or your site administrator) will most likely want to provide some extra CSS classes to make them look better.

Note

Creating and managing tables in HTML has historically been awkward. People tend to mis-use them for layout purposes, which you should not do.

Use tables only for tabular data. And, as rule of thumb, try to keep it to a very small number of rows and columns.

If you want to present information that is mostly tabular, such as larger amounts of statistical data, there are various add-ons to help you do that. These will generate nicer tables, and are easier to work with both for content editors and visitors to your site. Visitors will be able to sort tables and use a quick search to locate individual cells, for instance.