Skip to content

Instantly share code, notes, and snippets.

@radheymkumar
Created January 2, 2020 13:18
Show Gist options
  • Save radheymkumar/9823e33d3d3bbd4b8cd53b71cbea7676 to your computer and use it in GitHub Desktop.
Save radheymkumar/9823e33d3d3bbd4b8cd53b71cbea7676 to your computer and use it in GitHub Desktop.
Drupal 8 ajax popup
<ol>
<li>
<a class="use-ajax"
data-dialog-options="{&quot;width&quot;:400}"
data-dialog-type="modal"
href="/node/1">
First article displayed in modal dialog.
</a>
</li>
<li>
<a class="use-ajax"
data-dialog-options="{&quot;width&quot;:400}"
data-dialog-type="dialog"
href="/node/1">Second article displayed in non modal dialog.
</a>
</li>
<li>
<a class="edit-button use-ajax"
data-dialog-options="{&quot;width&quot;:400}"
data-dialog-renderer="off_canvas"
data-dialog-type="dialog"
href="/node/1">
Third article displayed in a nice off canvas dialog.
</a>
</li>
</ol>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment