By diegogers on
Hi,
I have a problem with my views argument handling code, when i'm logged in, it gives me one result and when i log out it gives me other one.
the views is displayed as a block in all pages that begin with "bandas" in its path.
This is an example:
When I visit www.example.com/bandas/expulsados/info
If I'm logged out the block title becomes "node/16////"
If I'm logged in it is "Próximas fechas de Expulsados"
Here's the code, any help will be very much appreciated.
if($type == 'block' && arg(0) == 'node' && is_numeric(arg(1))) {
$node = node_load(arg(1));
$path = explode("/", $node->path);
//to debug
$view->block_title = arg(0). "/" . arg(1). "/" . $path[0] . "/" . $path[1] . "/" . $path[2] . "/" . $node->path;
if ($path[0] == "bandas" || ($path[0] == "bandas" && $path[2] == "info")) {
$temp = array_keys($node->taxonomy);
$args[2] = $temp[0];
$view->block_title = "Próximas fechas de " . $node->taxonomy[$temp[0]]->name;
}
return $args;
}
Comments
path.module access?
Is this something to do with requiring administrative access to path.module?
Try temporarily turning on 'administer paths' for anonymous users - obviously not a good idea on a live site.
Some similar issue using contemplate module:
http://drupal.org/node/87223
Mark