Types and Views Betas with Many-to-Many Relationships
We’re very proud to announce a first beta of Types and Views with support for the new post relationship. This release lets you use the enhanced one-to-many and the new many-to-many relationships and easily display the related content.
Maybe it’s best to start by watching what’s in the package. We prepared two videos that show how to set-up and display one-to-many and many-to-many relationships:
Now, Views recognizes the new relationships that you set-up in Types. You can use the post relationships in two main places:
- When filtering items in Views queries
- When selecting posts for field-display
For example, the first video shows how airports and flights are connected using a pair of one-to-many relationships (which don’t make up one many-to-many relationship).
There are many “flights” in the database. When we show the “arrivals” to an airport, we’re not listing all the flights in the site. We create a View that filters flights and displays only the flights that are related to this airport through the “arrivals” relationship.
When we display the flight information, we also show the departure and arrival airports. For this, we use the “post selection” feature when displaying fields. We are in the template for “flight”, but using the post-selection, we can display fields that belong to the related “airport” posts.
If you get the concept of filtering by related content and selecting which post to display for fields, you’re all set with post relationship.
How to download
Types and Views betas are ready in your Toolset account, under Downloads. Switch to the Betas channel and you will see Types 2.3-b2 and Views 2.6-b1.
These are betas, so please don’t update existing production sites to them. It’s fine to use these betas for testing and more (see below).
Can I update existing sites to use these betas?
The new relationships are stored in a completely different way from the old ones. To protect your work, we intentionally block the new “relationships” GUI when we detect that your site already has some existing relationships.
You can migrate the existing relationships to the new schema and then use the new relationships GUI. To do this, go to Toolset -> Settings -> Custom Content -> Relationships, read the message carefully and click on the Activate button.
Once you do that, there’s no going back to the production versions. If you’re only trying the betas, back-up the database before running this migration.
What’s still missing from Views
This release of Views includes a lot of the planned support for post relationship, but not all. Among the missing feature (in this beta) are:
- Support for many-to-many filters in custom searches
- Proper GUI for setting up the display for Post Reference custom fields
- Convenient display for repeating field groups
All this will come in the next Views beta, right after the holidays.
Can I use it on production sites?
The many-to-many support in this beta is already way ahead of what’s available in the production versions of Toolset plugins. If you’re building a site that depends on many-to-many post relationship, you can go with the betas. They are fully tested through our QA process and we’ll have more similar beta updates in the coming weeks.
We’re going to do our very best to make this chain of betas backward compatible. However, there’s a small chance that you will need to make design changes for new betas. With production versions, we guarantee backward compatibility.
Otherwise, if your site doesn’t require many-to-many relationships, you should stay with the production versions.
When will it be ready in production?
Our target date for a production version of Types, Views and CRED with post-relationship is the end of January (2018, not 2019). We’re still developing most of the new code in CRED and we’re expecting feedback for Types and Views, so there may be surprises.
The videos are great, but please don’t stop there. Try the betas and see how you like it. Then, let us know by leaving your comments. The more feedback we get about the actual betas (not the videos or this post), the better the production versions will be.