As of the latest drupal release, there isn't an argument field that could be passed explicitly from the URL. In the case of page views, you can manipulate the url to pass in arguments.
For example node/% will have % applied automatically for the first argument declared in the view.
In the case of block views to achieve this, you can hack around the default argument option in your added contextual filter.
For example lets take a case where the url is /foo/bar
The following steps are to be followed.
Add two contextual filter arguments a and b.
Click on a, and in the popup dialog box select "Provide a default value"
and In the type select box choose "php code"
Insert the following code to return foo
<?php
return arg(0);?>
use
<?php
return arg(1);?>
to return bar.
This way by hacking the default value, you can specify the arguments with the url parameters.
In cases where you are using the url alias module follow the following steps.
$path = drupal_get_path_alias($_GET["q"]); //get URL alias $path = explode("/", $path); //break path into an array return $path[0]; // for foo return $path[1]; // for bar
For example node/% will have % applied automatically for the first argument declared in the view.
In the case of block views to achieve this, you can hack around the default argument option in your added contextual filter.
For example lets take a case where the url is /foo/bar
The following steps are to be followed.
Add two contextual filter arguments a and b.
Click on a, and in the popup dialog box select "Provide a default value"
and In the type select box choose "php code"
Insert the following code to return foo
<?php
return arg(0);?>
use
<?php
return arg(1);?>
to return bar.
This way by hacking the default value, you can specify the arguments with the url parameters.
In cases where you are using the url alias module follow the following steps.
$path = drupal_get_path_alias($_GET["q"]); //get URL alias $path = explode("/", $path); //break path into an array return $path[0]; // for foo return $path[1]; // for bar