Argument Picker API

This project is not covered by Drupal’s security advisory policy.

Argument Picker is a simple API to access and elaborate arguments in a flexible way.
Basically it allows, given URL arguments like:

to retrieve one of those arguments through a function:


which - in the specific example - would return "Volkswagen".

This module essentially adds the possibility to assign labels to arguments, through this syntax:

and then allows you to retrieve any argument using the label as a reference.

Some of the helper functions are dedicated to specific modules (i.e. Views), enhancing the accessibility of arguments:

Assuming "your_view" has a "foo" argument, using argument_picker, you could easily setup this argument's default value with:

return arg_picker_get_view_argument("foo");

which would return "4" (for the example above) or "all" (when the argument is not present).

Basically it's just an alternative to an url querystring with Drupal-specific add-on features, which comes extremely useful when implementing progressive filters (like a faceted search) through views but it also comes very handy for retrieving arguments in dynamic PHP blocks, panel panes, custom modules or wherever you want.

Not to mention that a normal querystring is still usable:

leaving every other querystring-related features intact.

Argument Picker API项目的Drush安装命令:复制到剪贴板



7.x-1.x-devtar.gz (9.5 KB) | zip (10.5 KB)2013年9月30日发布说明简 | 繁 | 更多