Data Table

Content Type for Presenting Data in Tables

Summary

A Data Table allows mobile-friendly data to be displayed in a sortable and searchable table. It is created by uploading a .CSV file that can also be downloaded by site visitors.

Audience

Web Managers 

Working Example

To see a working example of a Data Table on the Digital Commons website, navigate to:

Drupal Help > Drupal Help Topics

How To

  • 1

    Create a Data Table

    New Content Types are created using the Content menu in your toolbar. To create a new Data Table, navigate to: Content > Add Content > Data Table.

    Hand cursor selecting the Data Table content type from the add content menu.
  • 2

    Add a Title and Summary

    Fields marked with an asterisk (*) are required.

    • Title (*) - Enter the page name here. Include important keywords in the title to improve the search results. The optimal title length is less than 60 characters, including spaces.
    • Summary - Briefly describe the contents of the Data Table. The Summary appears in search engine results with the link. Provide a Summary to enhance Search Engine Optimization (SEO). Note: When left blank, the Summary field uses an excerpt from the Page Content as the summary.
    Form field for creating a new data table.
  • 3

    Body

    text editor toolbar
  • 4

    Table CSV File

    Data Tables are generated with comma-separated values (.csv) files, a simple text format for spreadsheets. You will use Microsoft Excel to create a CSV file that will be rendered as a responsive HTML table. 

    Header

    • The first row of the CSV file serves as the sortable table header. 

    Links

    To place a hyperlink on a value in a table cell, the link must be entered as HTML code. If cutting-and-pasting, use the Paste as Values option in Excel. 

    Example: <a href="https://nc.gov">NC.gov</a> 

    Microsoft Excel used to format a CSV file for creating a Data Table.
    Cell A2 includes the HTML format for displaying a hyperlink on a Data Table. 

    Add a New File

    • Click Choose File.
    • Select the appropriate CSV file.
    • Click Open.
    • The CSV file uploads automatically.
    • To remove the Data Table, click Remove.

     

  • 5

    Table Settings

    Data Table formatting settings

    Table Width

    This setting controls how much of the page width the table fills. Use the dropdown menu to set Table Width options:

    • None
    • Full Width
    • Normal
    • Narrow

    Results Per Page (*)

    This setting controls how many rows appear. The default value is 100. 

    Use the dropdown menu to choose the number of results to display per page from these options:

    • 10
    • 25
    • 50
    • 100

    If the Data Table spans multiple pages, the Previous and Next buttons allow navigation between pages.

    Checkboxes

    • Sort Alphabetically- Check this option to display table entries alphabetically. It is checked by default.
    • Display Date of Last Update- Check this option to show the modification date below the Data Table.
    The table settings appear at the bottom of the Data Table.
    Information about the Data Table appears at the bottom of the page beneath the table: Number of entries and page navigation; Export Table Data link; Date of Last Update. 
  • 6

    Save

    Data Tables only have two states: Published or Unpublished. Draft and Needs Review are not options. After a Data Table has been published, the Save button automatically publishes any changes to content.

    Checkbox: The state you want the content to be in the next time you select the Save button.

    • Published - This content is available to the public. Only a Web Manager can choose this state.
    • Unpublished - This content may have been available to the public at one time, but is not now. Only a Web Manager can choose this state.

    Delete: Deleted Content Types cannot be recovered. If you may need this content again in the future, it is best to change the state to Unpublished.

    Save often as you work on your content to avoid losing work due to timing out or navigating away from the page.
  • 7

    Export Data Table

    To update or edit the Data Table:

    • Click the Export Table Data link below the table entries.
    • The CSV file downloads automatically.
    • Update or edit the CSV file as desired, and then re-upload it as described in Step 4 above.
    • Save the page and view results.
    The table settings appear at the bottom of the Data Table.