How to implement custom URL handler to access JS modal content? [closed]

You could try with javascript, the following logic:

  • On page load check if a hash exist in the url with something like:

var hash = decodeURIComponent(location.hash.substr(1));

var teamHashes = ['peter-grouev', 'erick-yong'];

  • After that you will check if the hash is inside of one of your tables*:

if teamHashes.indexOf(hash) !== -1 { //show modal logic }

*if hash not in teamHashes table, then check the advisorsHashes table.

Now inside the above if, to show the modal, we need to declare the $modal like in your code and construct the url and make the ajax call to it, like:

if teamHashes.indexOf(hash) !== -1 {
    var $teamModal = new tingle.modal({
        footer: true,
        stickyFooter: false,
        closeMethods: ['overlay', 'escape'],
        closeLabel: "Close",
        cssClass: ['team-modal'],
        onOpen: function() {
            console.log('modal open');
        },
        onClose: function() {
            console.log('modal closed');
            $modal.setContent("");
        },

    var teamUrl = "https://greentec-capital.com/team/"+hash+"https://wordpress.stackexchange.com/";

    $.ajax({
           type: "POST",
           url: teamUrl,
           data: {},
           success: function(result){
               $modal.setContent(result);
               $modal.open();
           }
        });
});

That should do it.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)