SERC > SERC Content Management System > Data and Tables

Data and Tables

There are a number of options for presenting data in the CMS. The simplest options rely on the normal file and image tags. Data files in any format can be uploaded and made available for download via the normal file tag. In most cases you'll want to provide your data in a format that's widely recognized and readable. The Excel file formats are popular as is the Comma Separate Values format which can be read created by many tools (including Excel).

Data presented in charts and figures can be handled either by uploading a file that contains the chart within it (e.g. an Excel spreadsheet), or in an image format so that it can be viewed directly in the page. In most cases you'll want to at least provide an immediately viewable image and then additionally provide the charted data in a downloadable file if you expect people will want to manipulate the chart or view the underlying data. In most cases PNG is the best format for images of charts. Your graphing program may provide the facility to output the chart directly as a PNG (or some other raster format you can change into a png). In some cases it may be profitable to grab an image of a chart using screen capture software.

Data in Tables

There are a couple of easy methods of presenting simple data tables directly in the CMS. The first step is to get your data into CSV format. If you're working in a program like Excel you can usually use a Save As or Export option and explicitly choose the CSV format. Then upload your CSV file (just like any other file). Then, rather than posting it with a file tag use the csvtable tag like this:
[csvtable 123 medium]

where '123' is just the relevant file id number. medium refers to the width of the table with narrow and full being the other available options. The result will be a table with the values in the CSV file with the file description and a download link to the original data provided as a caption.

For large tables try the datagrid option

If your dataset is large enough that it won't fit comfortably in a table within a browser window you can try the datagrid tag instead:
[datagrid 123 medium]

This will present a scrollable view onto the full data table and should work reasonable even for very large datasets. Note that tools used to present this view are quite picky about the format of the underlying csv data.

  • Do all columns have a header/column name in the first row of the file (and only the first row)?
  • Are there any spaces after commas in header/first row?
    • days,months,years – CORRECT
    • days, months, years – NO
    • Date,Average Temperature,Expected Temperature,Humidity – CORRECT
    • Date, Average Temperature, Expected Temperature, Humidity – NO
  • Quotes should be wrapped around the cell if there are extra commas within a cell (e.g.: sentences):
    • title,name of band,"first venue,concert, or event you heard the band"– CORRECT
    • title,name of band,first venue,concert, or event you heard the band – NO
  • Trailing commas are unnecessary and cause extra columns to show:
    • days,months,years – CORRECT
    • days,months,years, – NO
  • "..." means no data for that cell exists

More Complex Data Tables

If the simple tables supported by the options above aren't sufficient for displaying your data get in touch with SERC staff. There are additional table tags available, but using them appropriately (e.g. so that the resultant tables meet accessibility guidelines) can be complex.

Tables for Uses Other Than Data? Probably Not

While you may be familiar with the use of tables in web pages for controlling page layout we encourage people not to follow that route in the CMS. There are a host of accessibility, usability and design issues that tables raise that the CMS is not designed to address effectively. In most cases there are ways to meet your design needs without resorting to tables. SERC staff are happy to suggest alternate approaches that make better use of the CMS's features and which we can be confident will result in web pages that will work for the broadest audience.



« Previous Page      Next Page »