Tell us what you are trying to do?
In a post, have a view containing a table of parameters that belong to an entity (pls see below explanation and question at no. 6)
1. Created two custom posts, 'entities' and 'parameters'
2. Created many-to-many relationship: Entities [*] << Entities Parameters >> Parameters [*]
3. Created custom fields for this relationship (data = number)
4. Created a bunch of parameter and entities (see parameters.jpg and entities.jpg)
5. Added parameter data to entity post (see screenshot entity_edit.jpg or paramater_edit.jpg)
6. Trying to create a view with a table that will show on post entity, the parameters assigned to it. This table should have the same layout as screenshot 'entity_edit.jpg', ie 1 parameter per row, and then a bunch of parameter values in the columns. I'm trying to follow https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items but no luck.
Pls let me know if this is possible with toolset and how I go about it.
Would be nice if this were in a tutorial site (as far as I can see there is no tutorial site with many-many relationships?)
Is there any documentation that you are following?
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items
What is the link to your site?
None - running on home server
Hello,
It is possible within Views plugin, for example, in a single "entities" post, you can try these:
1) Create a post view, query posts of Intermediary post type "Entities Parameters"
2) Filter by:
Select posts in a entities parameters relationship that are related to the Post where this View is shown.
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items
3) in section "Loop Editor", click button "Loop Wizard", choose option "Table"
https://toolset.com/documentation/user-guides/view-layouts-101/?#table
and display the parameter field values (parameter 1 min, parameter 1 max ...) + related "parameter" post information
See the document you mentioned above:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-one-related-item-parent
section "Displaying one related item"
Thank you for your assistance.
I have created views according to your instructions and attached screenshots of my results. However, this is not the desired result yet.
The view is creating the tables with the correct amount of columns and the appropriate parameter post titles. However, it is not showing data for parameter min and max value.
Pls see attached screenshots showing:
- parameter data from within the entity post editing screen
- view config
- screenshot of the view within an entity post
What do i need to do to show the actual data in the view?
Please note that the parameter min/max values are custom fields for the relationship entities<>parameters. I.e., several entities can share one or more parameters, however each entity will have unique parameter min max values.
As I mentioned above, you need to query posts of Intermediary post type "Entities Parameters", please try these:
create another many-to-many relationship between post types "Entities" and "Parameters", for example "Entities Parameters 2", in the "Relationship Wizard", step "Names", enable the option "Intermediary Post Type visible in WordPress admin menu", see screenshot names.JPG.
Then you will be able to create a post view, and query the Intermediary Post Type "Entities Parameters 2", and display custom fields values of it. See screenshot ip.JPG
Thank you that did the trick!
My issue is resolved now. Thank you!