[support] Views arguments Display

Joel Willers joel.willers at sigler.com
Tue Apr 10 13:56:57 UTC 2012


For whatever reason, arguments aren't passed into Blocks. There is a workaround, though. In the Contextual Filter, you set the Default Argument to PHP. Then you can use:

$path = drupal_get_path_alias($_GET['q']);
$path = explode('/', $path);
echo "<!-- path = $path -->"; //For error testing
if (($path[0] == 'path1' || $path[0] == 'altpath1') && $path[1] != '') {
  return $path[0];
}

$path[0] is first argument, $path[1] is second, etc.

Hope that helps!

Joel 

-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On Behalf Of Olivier BATARD
Sent: Tuesday, April 10, 2012 1:36 AM
To: support at drupal.org; Ms. Nancy Wichmann
Subject: Re: [support] Views arguments Display

Hi,

Thanks for your answer but I'm trying to display the view in a block, but I want that the view displays the data concerning the client on the page. I want to use argument to show the data filtered by a

2012/4/6 Ms. Nancy Wichmann <nan_wich at bellsouth.net>:
> The content area is a region, therefore it may contain blocks, such as 
> View can create. Most themes also have "Content Bottom" regions (and 
> if yours doesn't, it's trivial to add).
>
> If that's not quite easy enough, you can use the Viewfield module to 
> add a View to the node.
>
> Nancy
>
> Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. 
> King, Jr.
>
> ________________________________
> From: Olivier BATARD
>
> I'm just wondering (because I'm new to Drupal), I have a view with 
> with argument taken from the url with the node id as relation. I want 
> to have a page on which I can add some content and the view after the 
> content of my page. Basically I want that my view grab the id of the 
> page and display the correct information depending ont the node id. Is 
> the the best way to display the view ? How can I display my views 
> dynamically ?
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
--
[ Drupal support list | http://lists.drupal.org/ ]


More information about the support mailing list