wrve / wn-ajaxpopup-plugin
Plugin to show dynamic popups in frontend themes
Installs: 25
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 2
Open Issues: 0
Language:JavaScript
Type:winter-plugin
This package is auto-updated.
Last update: 2024-12-04 21:08:01 UTC
README
Plugin to show dynamic popups in the frontend. Inspired by an OctoberTrick.
Note: currently only supports Bootstrap 5 modals.
Usage
Add the [ajaxPopup]
to your page.
Add the data-popup
attribute to the element that triggers the Ajax request:
<button data-request="onYourAjaxHandler" data-popup="yourPopupIdentifier"> Show popup </button>
In your ajax handler reference the popup identifier:
function onYourAjaxHandler() { return [ 'yourPopupIdentifier' => $this->renderPartial('@your-partial'), ]; }