Is there a way to get the value of argument wihich is used. I need to use it in a php field to display the data as i want.
Basically, i have a multifield group (field A and field B), and i want to display only the field A value for which field B value = my argument.

Thank for help i 'm lost in the jungle of documentation

Comments

Roulion’s picture

Status: Active » Fixed

i finally find how to get the argument value : this piece of code show it

print var_export(arg(), TRUE);

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

aubjr_drupal’s picture

Thank you for posting this. The code from #1 give you the structure of the array. This can be placed either in the view footer (if you only want it to appear once) or in a custom PHP field (if you want it to appear with each row).

<?php
if (arg(foo) == bar) { // 
    print "<h1>YOUR TEXT</h1>";
}
?>

EDIT: Drupal 101 reminder: The argument array isn't going to match up between the Views preview and the actual display of the view element in a page/block.