As the number of databases grow here, it becomes annoying to add the fields for reviews in each of them. So, to fix that, I am going to build a new database for reviews that I can then connect to different articles or products as I see fit. This will give a central place for reviews that is flexible and easy to extend.
So what are we going to build?
This is a basic design that we will start with, as I already have this design built. It comes with a headline, a summary, a total review box, three headlines with ratings and a summary of how other people voted on the review. When writing the review, you will also have a long review text. This will not be a part of the review summary, however, but we will add a "See the full review" link to this design.
For this to work, we will first set up the database and add the custom fields that we need. In total, we will have ten custom fields for the layout itself:
- Review Theme (so we can set the color theme)
- Review Headline
- Review summary
- Review Summary Rating
- Review Category 1
- Review Category 2
- Review Category 3
- Review Category Rating 1
- Review Category Rating 2
- Review Category Rating 3
We will also need to connect the review to something, so there will be several custom fields for that. In my setup, I will attach the reviews to Articles, My Personal Blog, Products, Companies, Hosting, a generic one for the site and me and then I have two connections that I will need to build the databases for.
In order for this to pass through properly, we will need to add a basic relationship template in my theme. I have written an article about that here, and I am working on another one in the Invision community Playbook.
In each database item, we will be able to define the placement if we want to change it from the default, which will be at the bottom and we can also override the Review Theme if we want. This is so we can control the database items themselves.
Things I have not tried yet....
In the form, I want to try to limit the form so you only get one database relation instead of all options. Not only will it be a bit confusing to have multiple options, but it also opens up for other problems that I hope to avoid. The way I want to try to do that is to add conditions based on the selected category. This is since I plan to have the reviews database setup with one category for each database (so Product Reviews, Company Reviews and so on).
If things go as planned...
This should not be a very difficult setup, and I will use the same basic setup I already have with the Playbook templates. It will take some time as I am still down with what I suspect is Covid, so my brain is very slow and my energy levels almost nonexistent.
But we will get there soon enough as long as we move forward