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.
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"
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.
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:
lien caché
My issue is not resolved, but I've taken a different approach. Thank you!