Hi Minesh, I just found out that your solution is not working or you misunderstood me. Your query filter just checks for this condition:
Position an der Klinik is a string like VIEW_PARAM(position)
This is wrong. I don't want to display Mitarbeiters where the content of the "Position an der Klinik" field contains text similar to the page title. I want to display the "Position an der Klinik" only for the specific Klinik where the View is inserted. They are connected after all.
This guy has two "Positionen" at two different "Kliniken": hidden link
I want to display his position only at the clinic where the view is inserted.
Can you please create a test post where I can show you the demo and will share the required view.
You are using many views in single content template and its too confusing how you are using that content template with your page builder.
You may try to create a simple content template without any things and just add the required things you want to display and then let me know with what post type or post relationship you want to display what. This is something simple but you maybe doing it really complicated way.
The 2nd view you added to your content tempate " View „Position at Klinik“":
=> hidden link
I can see its displaying the correct related positions - is that correct output?
sorry for the late reply, I was ill.
It IS very complicated indeed. That is why I need help after all. I don't know how I can make it any easier for you, maybe with some test posts. So here comes:
I set all normal Mitarbeiter to Draft, so there are only three Dummies left: hidden link
They are working in different positions here at those test clinics: hidden link hidden link
Doc Martin is the important one, he is working at both test clinics! hidden link
Now please check my attached image - only his position at the Toolset clinic should be shown on the page of the Toolset clinic. His position "Master of Javascript Chirurgy" is his job at the Clinic for WP Problems, so it should not show up on this page.
Maybe a simple conditional would be enough so the other Kliniken are ignored in the loop of the nested view?
The views here hidden link show the correct data, but too much. It should only show the position of the currently shown clinic.
You have made really complicated structure and I'm not getting anywhere near from where what content is get displayed as you are using multiple views inside content template and the same content template you used to display with single page/posts.
So, I've created the following view:
=> hidden link
Where I set the view to display the related posts by adding the "Query Filter":
Filter by post relationship or repeatable fields group owner
Select posts in a Kliniken Mitarbeiter/innen relationship that are related to the Post where this View is shown.
And the within the view's loop I'm displaying the following content: