Skip Navigation

[Geschlossen] Display List of Child Post from Link in Modal

This support ticket is created vor 8 Jahre. 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 5 Antworten, has 3 Stimmen.

Last updated by Shane vor 7 Jahre, 11 Monate.

Assisted by: Shane.

Author
Artikel
#390369

I applied the below solution and need some tweaking. Inside my Parent posts list view table I duplicated this solution.

I visited this URL: https://toolset.com/forums/topic/display-the-all-child-message-count-of-parent/

Parent View:

<a href="[wpv-post-url]">[wpv-view name="My Count View" wpvprchildof="[wpv-post-id]"]</a>

Child View:
As instructed, I used

[wpv-found-count] Messages

in a separate child view to render the count from the relationship. It renders well in the parent post table view as expected!

I expected to see: It all works, but I really need the link to pop a modal listing the child posts and not go to the Parent's content template url view. I already have a post title url in a table column, so this would be a redundant link.

How do I tweak the code to not only give a count, but to render a child post list loop "onclick" in a modal? I can style the child list as a table in the modal on my own. Thanks!

#390498

To list Child Post Types (any information of those Posts) you create a View that lists the Post Type that is Child of (...) and then you call it where ver you want.

In your case you probably want to Query Child Posts of the Post set in the ShortCode argument (just as you do now for the count)

This View can be put into a Modal, and if you are on a specific Parent Post, and pass the ID of that parent Post to your View listing Child Posts, it should display all related Child posts.

It's elaborated here:
https://toolset.com/documentation/user-guides/displaying-related-child-posts/
https://toolset.com/documentation/user-guides/passing-arguments-to-views/

Please let me know if you need further infos about this.

Thank you for your patience.

#393527

Ok. Thanks. I'll give a try and post an update.

#394377

Shane
Supporter

Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jan,

Unfortunately Beda is not available today so i'll be filling in temporarily.

Please let us know as soon as you have an update for us.

Thanks,
Shane

#403207

Okay. How do I get that created child list view to pop a modal from a parent post title w/link onclick? Do I put a modal javascript in View or Content Template?

#403392

Shane
Supporter

Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jan,

You will need to add the modal js to which view/content template is displaying the parent post.

Next you will need to then add a link to the parent view to activate the modal. Could you let me know which modal code or plugin you are using ?

I know that modals normally have a structure that u must follow in order for it to work correctly.

Looking forward to hearing from you soon.

Thanks,
Shane

Das Thema „[Geschlossen] Display List of Child Post from Link in Modal“ ist für neue Antworten geschlossen.