I have created a page with views block and listing articles from a a specific content type. I have added a global: Custom text field and added a link that successfully opens a modal_dialog window with the code below.

<a class="use-ajax button" data-dialog-type="modal" href="node/{{ nid }}">open modal</a>

My request: I want to add an extra "close modal" button on that modal window to close the modal dialog and then slide to an anchor link or close and open another modal.

How can I do that?

  • The general recommendation is to use Drupal APIs.
    – mona lisa
    Commented Jul 5 at 11:29


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.