Skip Navigation

[Resolved] Create Template e View from a Multi to Multi Relationship

This support ticket is created 2 years, 11 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

Author
Posts
#2050057

Hi,

I've a list of USERS, each USER has 1 or more STUDIO.
I want to list USERS and for each USER i want to list all STUDIOs data (address, city, phone...).
Here the example: hidden link

I've create the USER and STUDIO Custom Post Types: hidden link - hidden link
I've create the JOIN from USERs and STUDIOs: hidden link
I think the JOIN is correct because here you can see that for this USER and STUDIO data match: hidden link - hidden link

I've create a template: hidden link
the template configuration: hidden link
editing template: hidden link
the system created the view: hidden link

When I try to edit the "USERs loop" adding the VIEW of his STUDIOs I've a problem, I can't save the changes and the "sub-view" hasn't any result.
My steps to create the view:
1. hidden link
2. hidden link
3. hidden link
4. hidden link
5. hidden link
6. hidden link (empty result and unable to save the template)

Where is my error?
Can you help me?

If you need I can create an admin user in wordpress.

Regards
Alex

#2050061
2046775-view_list_1.jpg
2046775-user_join_studio.png
2046775-template_list.jpg
2046775-template_detail.jpg
2046775-template_data.png
2046775-studio_scheda.png
2046775-create_view_06.jpg
2046775-create_view_05.jpg
2046775-create_view_04.jpg
2046775-create_view_03.jpg
2046775-create_view_02.jpg
2046775-create_view_01.jpg
2046775-compare.jpg

Here the same screenshot...

#2051381

Waqar
Supporter

Languages: English (English )

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

Hi Alex,

Thank you for contacting us and I'd be happy to assist.

I've checked the screenshots that you've shared and your steps seem to be correct. To troubleshoot why this isn't working, I'll need access to the website's admin area.

Can you please share temporary admin login details, in reply to this message?

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#2052961

Hi Waqar,

is it all ok? do you need more informations?

Regards
Alex

#2052975

Waqar
Supporter

Languages: English (English )

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

Thanks for writing back.

I tried to log in to the website's admin area, but it keeps showing the incorrect password message.

Can you please check the username and password again?

I've set your next reply as private.

#2053091

Waqar
Supporter

Languages: English (English )

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

The admin access details work, thank you.

Reviewing the setup and the screenshots, I understand that you're trying to create a new view, inside the content template 'Loop item in STP Utenti (Lista)', which is part of the view 'STP Utenti (Lista)'.

Nesting of one view into another view is not supported when using the blocks-based views. To show the 'Studi' posts related to the current 'Utenti' post from the view 'STP Utenti (Lista)', you'll need to create a classic view from WP Admin -> Toolset -> Views.

This new view will be set to show the 'Studi' posts with a post-relationship filter, as explained in this guide:
https://toolset.com/documentation/legacy-features/views-plugin/displaying-related-child-posts/

Once this view is ready, you can show it inside the content template 'Loop item in STP Utenti (Lista)', as an existing view.

I hope this helps and please let me know how it goes.

#2054357

Hi Waqar,

Thank you for your reply, now it works:

But How can i set up the filter to search in field inside the child item of my list.
In 'Studi' I've the field 'Località' (city) and in the main 'Utenti' list I've the search field:
hidden link

I tried but it doesn't work 🙁

I hope it is clear.

Regards
Alex

#2055047

Hello,

Waqar is on holidays, I will take care of this thread.

I can login into your website and have checked your website settings.

I assume we are talking about this post view "STP Utenti (Lista)":
hidden link
It is querying "STP Utenti" posts, you are going to filter the result by custom field "Località", which is assigned to related another post type "STP Aziende", see it's field group setting here:
hidden link

If it is, it is not possible with Toolset plugin yet, Toolset Blocks plugin is using WordPress class WP_Query to query posts, you can filter the result by custom fields in same post type "STP Utenti", you can not filter the result by fields of another post type "STP Aziende".

Hope it help

#2057381

Hi,

thank you for you reply, but then how can I do what I need?
there is a way to do it?

Regards
Alex

#2057385

As I mentioned above, it is not possible with Toolset plugins, you can add a feature request:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
Our developers will evaluate it.

Currently, you will need to consider to move custom field "Località" into post type "STP Utenti".

#2067951

thanks...
another question: why the sorting doesn't work?

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