Greetings,
The Toolset framework is impressive and offers some excellent tutorials which I have been doing my best to get through. However, with a deadline pressing, I would like to ask a question about relationships.
My background is Drupal for the past 8 years: I've never had a go with WordPress and am struggling with basic concepts.
In this specific case, I am migrating a bunch of nodes (posts) from Drupal to WP, and I need to keep the entity relationships intact.
We have type=projects and type=publications
Projects have a unique NID value, and I have imported this to the CPT postname value, and the value is also stored in a custom field.
Each project can have many publications...but the project itself has no idea about these publications. In other words, there are no "referencing nodes" values stored on each project.
Over on the publications side, each publication may have up to 1 project reference. This value is stored as ProjNID and is sitting in a custom field.
I am trying to do two things with relationships and views:
1. When a Project post is loaded, I want a View that dynamically takes the current post variables (eg URL as query parameters), use a defined relationship, and load/display custom fields from related publications (loop).
2. When a Publication post is loaded, I want a view that dos the same thing, except its relationship will allow it to loads custom fields from the one related project.
In Drupal this would be a straightforward process...and I just feel it is in Toolset as well, but I can't get my head around how to make it work "the Toolset Way".
I think I need two different relationships and two different views...one to work for each of the CPTs.
Starting with the Projects, they have a 1:M with Publications (each Project can have many publications related to it).
But projects themselves have no list of these related Publications...that value sits in the Publications.
So the query has to run "backwards"...[for (thispost); take URL(string); find all publications where URL(string) = ProjNID]
Does that make sense? How can this be configured in Toolset?
Perhaps I will leave it there...maybe if you can help me with this half of the query I can work out the other situation with querying for a Project reference when a Publication post is loaded.
Thanks indeed for your assistance!!