Hi Stephen,
Thank you for contacting us and you're on a right track.
Reading through both these tickets, I feel what you're aiming at is possible, without having to write custom SQL queries, using any of these:
- nested views with the post-relationship filter,
- item attribute,
- toolset_get_related_posts function.
Note: Since nested views are not supported in the Blocks environment, whenever, you'll need to show related post information across multiple levels, you'll have to switch to the legacy/classic views.
While working with the related posts, it is important to keep track of the scope of the 'current' post. For example, if the current post is the intermediary post from the "Exhibitions to Artworks", it means that using the "item" attribute or view with the post-relationship filter you can reach its "Artworks" post. And once you've reached the "Artworks" post, you can reach its "Artist" post in the "Artist to Artworks" relationship too, which will only be one as it is a one-to-many relationship.
Now, which of the three tools should be used, depends on the particular requirement and where and how you need to show the related post(s).
If you just have to show a single field data from a directly related post and where only a single related post can exist, you can use the item attribute with the relevant shortcode.
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/ )
If you have to show multiple related posts, multiple fields from a single related post, or have to go multiple levels deep into relationships, then it would be beneficial to change the scope of the current post, segment-by-segment, using views with the relationship filter.
And if you'd prefer working with Blocks editor and/or are comfortable with the PHP code, then you skip the use of multiple/nested views and can do the heavy lifting in the PHP code by getting the data from multiple levels related item(s) through a custom shortcode that uses "toolset_get_related_posts" function.
I hope this explanation helps.
regards,
Waqar