Hi,
I use a PHP validation to set the argument of an Ajax view, which work fine the first time the view loads:

$catnid = $_GET['cat'];
if ($catnid != '') {
   $handler->argument = $catnid;
   return TRUE;
}
else {
   $handler->argument = 'all';
   return TRUE;
}

(The GET variable is present and filters the view according to this variable ; otherwise, the argument is ignored).

However, as soon as I click on an exposed filter, the view reloads and takes into account the exposed filter, but returns a result on all the values: it doesn't check again the GET variable (which is present in the url).

If I remove the php validation and simply put an argument, like $catnid = $_GET['cat'];return $catnid; , the view works fine.

Is this normal? Is there a way to force the "re-validation"?
(The view is embedded in a node.tpl.php file, with <?php print views_embed_view('my_view', 'default'); ?> )

Comments

MustangGB’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)