Data, Collections & Records
Data
Or the Excel file which contains all the listings/records which will be served by the directory. File should be of type .xlsx
only.
All the major spreadsheet software allow exporting to Excel format which saves the file as .xlsx
which can be then imported.
It is possible to host multiple collections per directory. Consider the example of “job listings” directory. The straightforward collection would be collection of “jobs” but you can also have “companies”, “positions” or “locations”.
Collections
Every worksheet inside the Excel file corresponds to a collection. Every collection is a collection of records/listings (rows). E.g. if the directory is about “Job Listings” then the collection would “jobs”.
It is expected that minimum 2 collections (worksheets) are present in any imported Excel file:
- __ collections_: This is “reserved” collection(worksheet) which contains metadata for the directory. Every directory can host multiple collections. E.g. For Job Listings directory, there can be “jobs” and “companies” as different collections. This worksheet named as “_collections” contains all the collections served by the directory.
Required columns:
id
: Number. Unique serial ID for every row in the worksheetcollection
: Text. Unique, name of other worksheets which are collections served by the directory
Optional columns:
slug
: Text. Unique, URL slug for this collection. For “job” collection if the slug is “jobs” then all the records/listings under this collection would have URLexample.com/jobs/{job-id}
. If not provided then a slug is autogenerated based on worksheet name.
You can other columns too.
- Your collection(s): This is the actual collections which are served by the directory e.g. “jobs” or “companies”.
Each collection has its own worksheet with unique name (no special characters except underscore). Name of this worksheet
is added under
collection
column in_collections
worksheet, effectively registering this collection.
Required columns:
id
: Number. Unique serial ID for every row in the worksheettitle
: Text. Unqiue, title of every record/listing in this collection
Optional columns:
slug
: Text. Unique, URL slug for this record/listing. For a particular job under jobs collection, if the slug is “job-123”, then the URL for that webpage would beexample.com/jobs/job-123
. No special characters except hyphens.
You can have other columns like image, URLs, description. Upto you.
This embeded google sheet shows ideal Excel file. Notice the _collection
worksheet at bottom which contains
all the registered collections, except “positions” which althought present in the excel won’t be served by the directory.
Records
Every single row in any worksheet is a record (listing). Each one of these row will lead to a new web page. Every row under a worksheet must have unique ID and title cell values. If slug is provided then it must also be unique.
How to utilize these values is demonstrated in the next section.
Importing data
Before you begin you need to import all data (listings). This data affects pages created and dynamic data that can be populated. For every new project, importing data is required step you cannot proceed to designing without it. For subsequent design or to update data in future, go over to data tab and import again, check this video for demo.
This video demonstrates, initial import when project is newly created. The imported excel only cantains one worksheet “pages” (slug “/pages2”). Later new worksheet is imported with 2 worksheets “pages” (slug “/pages”) & “search_engines” (slug “/se”) from the Data tab. After importing, the Data tab shows available variables for the imported collection.
Post Import
After importing data (or reimporting), you’ll observe that
- List of pages have changed from top left corner – if number of collections or slug for any collection is updated
- Data tab has been updated – if columns in any collection has been changed