How to create an “Index” or “Archive” page
-
If you’ve created a Virtual Post configuration for an Airtable table called “Things”, your URL Pattern might look something like:
^things/(.*)/?$
and your filterByFormula would be{Thing Slug}="$1"
This will give you a page per record. But what if you want a page that has “access” to ALL the records?
While the simple answer is to create a new Virtual Post configuration with a URL Pattern like
^things/?$
and a filterByFormula ofNOT({Thing Slug}=BLANK())
there is a huge caveat to make this work.Since both
^things/?$
and^things/(.*)/?$
will match the URL “/things/” you must either place the “index” or “archive” Virtual Post configuration FIRST, or make the regular expressions more specific. So consider using^things/(.+)/?$
.Sorry for the long-winded explanation, but Regular Expressions can get tricky. I highly recommend playing around on https://regex101.com/, just remember that on Airpress you don’t need to escape your front slashes, but on regex101 you do need to.
- The topic ‘How to create an “Index” or “Archive” page’ is closed to new replies.