How do I access URL parameters from my custom module? I have set up a custom page with Panels.

In the Panel configuration I have set the page path to /products/%term.

I made a custom module which currently displays "Hello world" on this page, and all is well.

function product_tree_block_view($delta='') {
  $block = array();
  switch($delta) {
    case 'product_tree' :
      $block['content'] = theme('product_tree', array("greet" =&gt; "Hello world",));
      break;
  }
  return $block;
}


However; I would like to process the %term to fetch some additional information, relevant only to the current %term.

My question is: How can I access the %term? Is this variable accessible from my module at all?
The function arg() will do that for you. For example, in path http://siteurl/products/%items,  


arg(0) will have the value products (first value after your $base_url)
arg(1) will have the value of %items (second value).  


You might then just apply your logic, in this this case you could do the check arg(1).