wrve/wn-ajaxpopup-plugin

Plugin to show dynamic popups in frontend themes

Installs: 21

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 2

Open Issues: 0

Language:JavaScript

Type:winter-plugin

dev-main 2021-06-04 13:35 UTC

This package is auto-updated.

Last update: 2024-04-04 19:49:50 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'),
    ];
}