Skip Navigation

[Résolu] Best way to build this site?

This support ticket is created Il y a 8 années et 5 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Marqué : 

This topic contains 2 réponses, has 2 voix.

Last updated by morktron Il y a 8 années et 5 mois.

Assisted by: Minesh.

Auteur
Publications
#345652

Hi, I'm trying work out the best way to build a site. I have 3 types of information that need to interrelate to each other.

Rigs
Services
Projects

A Rig needs to show what Projects they have been used on

A Project needs to show which Rigs and Services were used for the Project

This is my plan so far:

Rigs - cpt
Services - custom taxonomy for Rigs and Projects
Projects - cpt

I'm assuming I have to use a 'many to many' relationship? but I'm not sure about:
1. How to define the 'intermediary object' ?- maybe 'Geotech Usage', since Rigs are 'used' for Projects and Projects 'use' Rigs.
2. Should Projects be a child of Rigs or Rigs a child of Projects?

I'm a little baffled here, any help would be much appreciated. Thanks

#345797

Minesh
Supporter

Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I'm assuming I have to use a 'many to many' relationship? but I'm not sure about:
1. How to define the 'intermediary object' ?- maybe 'Geotech Usage', since Rigs are 'used' for Projects and Projects 'use' Rigs.

If you create intermediary post type in order to achieve your goal. The same thing is very well explained with our documentation:
https://toolset.com/faq/how-do-i-associate-one-child-with-several-parents-of-the-same-type/

You can see the two different types using which you can establish Many to Many:
=> Using WordPress taxonomy
=> Using an intermediary custom type

=> https://toolset.com/documentation/user-guides/many-to-many-post-relationship/#1
=> https://toolset.com/documentation/user-guides/creating-post-type-relationships/

2. Should Projects be a child of Rigs or Rigs a child of Projects?
=> If you use 'intermediary object' lets say 'intermediary object' object CPT name is "ProjectsRigs" then for "ProjectsRigs" CPT Projects and CPT Rigs should be set as Parent. Its well explained with our documentation. Please see our example for bands and events.
=> https://toolset.com/documentation/user-guides/many-to-many-post-relationship/#1

Please refer to following ticket as well that is related to Many to Many relationship:
=> https://toolset.com/forums/topic/how-to-create-a-relationship-from-1-child-to-2-parents-of-same-post-type/

#345960

Thanks Minesh, ok that is great, I think I understand now - the 2 CPT's need to be the parent of the intermediary object.

You documentation is fine, I just had a hard time thinking of it in terms of my project . All good now, thanks again

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.