Skip Navigation

[Resolved] Many to many relationships with parametric search

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 11 replies, has 4 voices.

Last updated by tonyS-8 9 years ago.

Assisted by: Waqas.

Author
Posts
#287208

I am trying to: create a many to many relationship to do a parametric search. I have followed the tutorial https://toolset.com/documentation/user-guides/many-to-many-post-relationship/ In the example they have (bands - appearances - events) with the common being appearances. in the field table you can only choose one band and one event to belong to that appearance.

I want to link appearances to more than one event. I know this sound silly. But I am trying to do (body parts- abnormalities- diagnoses) with abnormalities being the common. You can have one abnormality belonging to one body part but you can have an abnormality be part of more than one diagnosis. How do I achieve this?

#287223

Okay I found this example https://toolset.com/faq/how-do-i-associate-one-child-with-several-parents-of-the-same-type/ and I have things set up just like in the 2nd example ( Using an intermediary custom type) for the greater flexibility for adding content.

It says "To display songs in an album, load the ‘listings’ of an album and then, load the songs of a listing."

The only problem with this is the song shows up twice in the listing

I plan on running a parametric search with checkboxes on the listings or in my case the abnormalities to get a possible diagnosis or diagnoses. This will display duplicates in the abnormality list.

How do I get around This?

#287316

Do you want to share access to see how you have setup things?

Thanks
Caridad

#287456

My project is on a local install

#288236

Hi Tony,

Is that possible to provide a test installation where we can play? If not, please let us know and we'll prepare one for you.

#288944

I have my site on line now but you need to login to get in. please send secure way to get that login information to you.

Thanks

#290012

I have marked your next reply as private.

#291675

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

This is Waqas here, on behalf of Ms. Caridad. I will be handling this thread from now on.

I am looking into this thread now, please allow me some time to work on this. I will update you as soon as I find a solution.

Thank you for your cooperation and patience.

#291916

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I am trying to understand the setup of your many-to-many relationship, between several CPTs. But I think I am not understand it completely.

Since your parametric search on home page, uses all types of anomalies as post taxonomies, while for many-to-many relationship, these seem to be CPTs.

Generally, taxonomies work quite differently than CPTs. Can you please explain that how you plan to list all these CPTs as checkboxes and how do expect the search results? This will help me understanding the scenario. Although your intermediary object (anomalies list) looks fine too.

A detail explanation and some diagram or graphics/images will help as well, thanks.

#292002

I was trying create a search just like the one on the home page. To look and work the same. I thought if I could create it with CPT's that I would have more flexibility with the abnormalities (For pictures and content of each abnormality) The way I have it set up now with a taxonomy the abnormality is just a search term. It does not go anywhere. If this cant be done I understand.

#292272

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Unfortunately, CPTs do not work as search terms. This is not a natural way of WP system, unlike the Taxonomies. This will require a lot of custom coding efforts and much time to enforce such a system within the WP scope.

Since CPTs contain custom posts, which you can display as checkboxes, but this is not how View is designed to offer you some builtin solutions (i.e. using taxonomies you can do this easily).

There are several 3rd party plugins available which you can use to add custom fields and thumbnails with categories/taxonomies, like:

- https://wordpress.org/plugins/custom-taxonomy-category-and-term-fields/
- hidden link
- https://wordpress.org/plugins/taxonomy-images/
- search Word Press plugins repository for more: https://wordpress.org/plugins/

I hope you understand the complexity of this and looking at 3rd party plugins may help you achieving that.

#292366

Thank you for taking the time to explain/research this. I will check out the plugins.

The forum ‘Types Community Support’ is closed to new topics and replies.

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