PopupsDocs > Extensions > Plugins > Popups
Here's a nifty little plugin for creating automatic popup windows on your site. Note that these are browser based popups rather than css popups.
This function will load dynamically unless you have dynafunc disabled. In which case you will have to load via site.config:
To use it, put a popup function on the page. The two required parameters are "link" and "label". Link can be a page or url. Here's a simple example:
<(popup 'action.help' 'Click Here')>
There are a number of additional optional parameters you can include to modify how this function works. You can add a style or class parameter to change how the link displays. You can change the height and width of the box by changing those settings from the default size of 370px x 500px. You can also specify a target value if desired, though this is not normally needed. And you can create an attr parameter with to control how the popup box displays (toolbar, menubar, statusbar, resizeable, scrollbars, etc), though most browsers increasingly seem to ignore these settings. The only generally working one is the top and left initial positioning.
Here's a more advanced example, to show you how some of those parameters affect the display.
<(popup 'https://www.google.com/search?q=boltwire' 'SEARCH' height=600 width=800 attr="top=10px,left=400px" class=button)>
Note: You can use this same function to close a window, by inserting the close command followed by the label for the link.
<(popup close "Close Window")>