Skip Navigation

[Resolved] Passing a parameter to a popup (Divi Overlays)

This thread is resolved. Here is a description of the problem and solution.

Problem:

I have a view that lists businesses and another view that displays a single business' details. Ideally, I would click on a "Details" link and pass a parameter to a popup, and the popup contains a view controlled by the parameter, but that doesn't work.

Solution:

1) Toolset Views does accept URL parameter to filter the view's result, it is a built-in feature of Toolset Views/Blocks plugin.

2) The problem is the Divi popup does not accept URL parameter

Relevant Documentation:

https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/#controlling-the-filter-with-url-arguments

This support ticket is created 3 years, 7 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)

This topic contains 4 replies, has 2 voices.

Last updated by DavidW2160 3 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#1729951

I have a view that lists businesses and another view that displays a single business' details. Ideally, I would click on a "Details" link and pass a parameter to a popup, and the popup contains a view controlled by the parameter, but that doesn't work. The issue seems to be that parameters (e.g. "post-ids=[wpv-post-id)") can't be passed to popups (Divi Overlays). The only alternative that seems workable is to pass a parameter to a php script that in turn does the heavy lifting - either somehow filter the view I need some help figuring out how to make this work.

#1730285

Hello,

I think there are some misunderstandings:
1) Toolset Views does accept URL parameter to filter the view's result:
https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/#controlling-the-filter-with-url-arguments
It is a built-in feature of Toolset Views/Blocks plugin.

2) The problem is the Divi popup does not accept URL parameter, can you confirm it?

There is a workaround does not need custom codes:
After user click each link you mentioned above(e.g. "post-ids=[wpv-post-id)"), open different DIVI pupup, in each popup content, display a view shortcode with different shortcode attribute, for example:
[wpv-view name="houses" ids="[wpv-post-id]"]

See the document I mentioned above:
section "Controlling the filter with shortcode attributes"

#1731259

1)Yes, I know that views accept URL parameters, but evidently the popups don't accept URL parameters.

2) Are you saying that I would need a separate popup for each "busienss" post_id, even though I'm using the same view? That's not workable. That would mean that I would have to create a new popup for each entry in my business/membership list, which would require manual interaction each time someone signed up.

#1732657

It depends on Divi popup, you can check it with Divi supporter, check if Divi popup accepts URL parameter.

With Bootstrap Modal, you can open a popup and load HTML "iframe" tag, and pass URL parameter to target page in "src" attribute of "iframe" tag, in the target page, display the view shortcode, see below example:
https://stackoverflow.com/questions/25565716/load-iframe-in-bootstrap-modal

More help:
hidden link

#1737739

My issue is not resolved, but I've taken a different approach. Thank you!

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