Craft Tablecloth
  • What is Tablecloth?
  • Installation
  • Table Definition
    • Data Source
    • Columns
    • Options
    • General Settings
    • Advanced
  • Table Rendering
    • Default Table
    • Templates
      • Table Templates
        • Cards Layout Example
      • Field Type Templates
      • Specific Field Templates
      • Child Rows
  • Programmatic Interaction
    • Interacting with The Table
    • Events
    • Methods
  • Localization
  • Contact Us
Powered by GitBook
On this page
  1. Table Definition

Advanced

Dataset Prefiltering: Allows you to write your own SQL to narrow down the initial dataset. Columns are designated by their handles wrapped in double curly braces, e.g {{slug}}. For example, to limit entries to the last 10 days you can use:

DATE({{postDate}})>=DATE_SUB(CURRENT_DATE, INTERVAL 10 DAY)

The query is validated when you save the table, and stripped out of any possibly dangerous SQL keywords. If the query fails to execute you will get an error, and the query will not be saved.

PreviousGeneral SettingsNextDefault Table

Last updated 3 years ago