Is there any way to reference an existing Popup from a button?

When building a page I find times when it make sense for the same popup to be invoked from multiple buttons on the page.

Typically the first time you use the create popup option and you get a nice blank popup and you get to work dragging and dropping your elements.

Once I have that popup the way I want it and I am creating a new button perhaps on a different tab that I want to share that popup is there a way to reference an existing popup?


Your best bet is to create the pop up as a standalone page.  Then add a popup with a page include to pull in your existing ‘popup’.  This will keep you declarative.

If you go the snippet route, you can open a popup using a snippet.  Then each time you want to open the popup, you just need to have the button run the snippet.

A third option that keeps you away from coding a snippet is to go to the XML view in the page builder and copy your popup XML definition.  You are ‘copying code’, but it saves you the steps of manually building the popup.



Why not try a wrapper with a render condition. Create a model and a UI field that updates to a value on button click (or anything else you want that can have multiple actions). You can also make the other page elements render conditions = null so this will be the only page content seen at the time you want to display the “pop up.”