ibelar / atk-wordpress

Wordpress plugin development using Agile Toolkit Framework (atk). Wordpress site demo available on www.atkwp.com
8 stars 7 forks source link

atk4/mastercrud page parameter for relations loaded dynamically #12

Open roelleor opened 6 years ago

roelleor commented 6 years ago

in AtkWpApp.php you add page like this:

 if ($wpPageRequest = @$_REQUEST['page']) {
            $extraArgs['page'] = $wpPageRequest;
        }

However, this page agrument is missing when a relation is loaded dynamically. One solution could perhaps be the following: in jsUrl(): check if for path in extraArgs, if its there, add page as argument. Page could be extracted from the server $_SERVER['HTTP_REFERER'], but perhaps there's a more elegant method?